browser/base/content/test/general/test_feed_discovery.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:3c40248db155
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=377611
5 -->
6 <head>
7 <title>Test for feed discovery</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=377611">Mozilla Bug 377611</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
15
16 </div>
17 <pre id="test">
18 <script class="testbody" type="text/javascript">
19
20 /** Test for Bug 377611 **/
21
22 var rv = { tests: null };
23 var testCheckInterval = null;
24
25 function startTest() {
26 var url = window.location.href.replace(/test_feed_discovery\.html/,
27 'feed_discovery.html');
28 SpecialPowers.openDialog(window, [url, '', 'dialog=no,width=10,height=10', rv]);
29 testCheckInterval = window.setInterval(tryIfTestIsFinished, 500);
30 }
31
32 function tryIfTestIsFinished() {
33 if (rv.tests) {
34 window.clearInterval(testCheckInterval);
35 checkTest();
36 }
37 }
38
39 function checkTest() {
40 for (var i = 0; i < rv.tests.length; ++ i) {
41 var test = rv.tests[i];
42 ok(test.check, test.message);
43 }
44 SimpleTest.finish();
45 }
46
47 window.onload = startTest;
48
49 SimpleTest.waitForExplicitFinish();
50 </script>
51 </pre>
52 </body>
53 </html>
54

mercurial