gecko/dom/tests/mochitest/bugs/test_bug641552.html
2013-02-26 22:23:08 -08:00

43 lines
1.4 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=641552
-->
<head>
<title>Test for Bug 641552</title>
<script type="application/javascript" src="/MochiKit/packed.js"></script>
<script type="application/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=641552">Mozilla Bug 641552</a>
<p id="display"></p>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 641552 **/
SimpleTest.waitForExplicitFinish();
SpecialPowers.addCategoryEntry("JavaScript-global-property", "randomname", "@mozilla.org/embedcomp/prompt-service;1",
false, true);
SpecialPowers.addCategoryEntry("JavaScript-navigator-property", "randomname1", "@mozilla.org/embedcomp/prompt-service;1",
false, true);
SpecialPowers.addCategoryEntry("JavaScript-navigator-property", "randomname2", "@mozilla.org/embedcomp/prompt-service;1",
false, true);
SimpleTest.executeSoon(function () {
ok(window.randomname, "window.randomname should return an object");
is(typeof(window.navigator.randomname1), 'object', "navigator.randomname1 should return an object");
is(typeof(window.navigator.randomname2), 'object', "navigator.randomname1 should return an object");
SimpleTest.finish();
});
</script>
</pre>
</body>
</html>