tenfourfox/dom/base/test/test_navigator_resolve_identity_xrays.xul
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

45 lines
1.5 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=985827
-->
<window title="Mozilla Bug 985827"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
<iframe id="t"></iframe>
<!-- test results are displayed in the html:body -->
<body xmlns="http://www.w3.org/1999/xhtml">
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=985827"
target="_blank">Mozilla Bug 985827</a>
</body>
<!-- test code goes here -->
<script type="application/javascript">
<![CDATA[
/** Test for Bug 985827 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
var nav = $("t").contentWindow.navigator;
ok(Components.utils.isXrayWrapper(nav), "Should have an Xray here");
// Test WebIDL NavigatorProperty objects
is(typeof nav.mozContacts, "object", "Should have a mozContacts object");
is(nav.mozContacts, nav.mozContacts,
"Should have gotten the same mozContacts object again");
// Test Javascript-navigator-property objects
is(typeof nav.mozApps, "object", "Should have a mozApps object");
is(nav.mozApps, nav.mozApps,
"Should have gotten the same mozApps object again");
SimpleTest.finish();
});
]]>
</script>
</window>