зеркало из https://github.com/mozilla/pjs.git
58 строки
1.4 KiB
HTML
58 строки
1.4 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=377611
|
|
-->
|
|
<head>
|
|
<title>Test for feed discovery</title>
|
|
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
|
<script type="text/javascript" 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" type="text/javascript">
|
|
|
|
/** Test for Bug 377611 **/
|
|
|
|
var rv = { tests: null };
|
|
var testCheckInterval = null;
|
|
|
|
function startTest() {
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
|
var url = window.location.href.replace(/test_feed_discovery\.html/,
|
|
'feed_discovery.html');
|
|
window.openDialog(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];
|
|
ok(test.check, test.message);
|
|
}
|
|
SimpleTest.finish();
|
|
}
|
|
|
|
window.onload = startTest;
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|
|
|