diff options
Diffstat (limited to 'comm/suite/browser/test/mochitest/test_feed_discovery.html')
-rw-r--r-- | comm/suite/browser/test/mochitest/test_feed_discovery.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/comm/suite/browser/test/mochitest/test_feed_discovery.html b/comm/suite/browser/test/mochitest/test_feed_discovery.html new file mode 100644 index 0000000000..2f2a0a459e --- /dev/null +++ b/comm/suite/browser/test/mochitest/test_feed_discovery.html @@ -0,0 +1,56 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=240393 +--> +<head> + <title>Test for feed discovery</title> + <script src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=377611">Mozilla Bug 377611</a> +<p id="display"></p> +<div id="content" style="display: none"> + +</div> +<pre id="test"> +<script class="testbody"> + +/** Tests for bug 240393 (from bug 377611 on Firefox side) **/ + +var rv = { tests: null }; +var testCheckInterval = null; + +function startTest() { + var url = window.location.href.replace(/test_feed_discovery\.html/, + 'feed_discovery.html'); + SpecialPowers.openDialog(window, [url, '', 'dialog=no,width=10,height=10', rv]); + testCheckInterval = window.setInterval(tryIfTestIsFinished, 500); +} + +function tryIfTestIsFinished() { + if (rv.tests) { + window.clearInterval(testCheckInterval); + checkTest(); + } +} + +function checkTest() { + for (var i = 0; i < rv.tests.length; ++ i) { + var test = rv.tests[i]; + if (test.todo) + todo(test.check, test.message); + else + ok(test.check, test.message); + } + SimpleTest.finish(); +} + +window.onload = startTest; + +SimpleTest.waitForExplicitFinish(); +</script> +</pre> +</body> +</html> |