1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/base/test/test_navigator_resolve_identity_xrays.xul Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +<?xml version="1.0"?> 1.5 +<?xml-stylesheet type="text/css" href="chrome://global/skin"?> 1.6 +<?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?> 1.7 +<!-- 1.8 +https://bugzilla.mozilla.org/show_bug.cgi?id=985827 1.9 +--> 1.10 +<window title="Mozilla Bug 985827" 1.11 + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> 1.12 + <script type="application/javascript" 1.13 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> 1.14 + 1.15 + <iframe id="t"></iframe> 1.16 + 1.17 + <!-- test results are displayed in the html:body --> 1.18 + <body xmlns="http://www.w3.org/1999/xhtml"> 1.19 + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=985827" 1.20 + target="_blank">Mozilla Bug 985827</a> 1.21 + </body> 1.22 + 1.23 + <!-- test code goes here --> 1.24 + <script type="application/javascript"> 1.25 + <![CDATA[ 1.26 + /** Test for Bug 985827 **/ 1.27 + 1.28 + SimpleTest.waitForExplicitFinish(); 1.29 + addLoadEvent(function() { 1.30 + var nav = $("t").contentWindow.navigator; 1.31 + ok(Components.utils.isXrayWrapper(nav), "Should have an Xray here"); 1.32 + 1.33 + // Test WebIDL NavigatorProperty objects 1.34 + is(typeof nav.mozContacts, "object", "Should have a mozContacts object"); 1.35 + is(nav.mozContacts, nav.mozContacts, 1.36 + "Should have gotten the same mozContacts object again"); 1.37 + 1.38 + // Test Javascript-navigator-property objects 1.39 + is(typeof nav.mozApps, "object", "Should have a mozApps object"); 1.40 + is(nav.mozApps, nav.mozApps, 1.41 + "Should have gotten the same mozApps object again"); 1.42 + 1.43 + SimpleTest.finish(); 1.44 + }); 1.45 + ]]> 1.46 + </script> 1.47 +</window>