Backed out changeset 713114c0331a (bug 1938707) by developer request CLOSED TREE
[gecko.git] / js / xpconnect / tests / chrome / test_bug448587.xhtml
blobcedab9ebbdd86d46cafc25aff78c25bee3f25661
1 <?xml version="1.0"?>
2 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
3 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=448587.xul
6 -->
7 <window title="Mozilla Bug 503926"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11 <!-- test results are displayed in the html:body -->
12 <body xmlns="http://www.w3.org/1999/xhtml">
13 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=448587"
14 target="_blank">Mozilla Bug 448587</a>
15 </body>
17 <!-- test code goes here -->
18 <script type="application/javascript">
19 <![CDATA[
21 // Bonus test - collaborate with test_bug361111.xhtml to make sure that
22 // flushPrefEnv is appropriately called.
23 ok(!SpecialPowers.Services.prefs.prefHasUserValue('testing.some_arbitrary_pref'),
24 "Pref shouldn't carry over from previous test!");
27 /** Test for Bug 448587 **/
28 var sandbox = new Cu.Sandbox("about:blank");
29 var fwrapper = Cu.evalInSandbox("function f() {} f", sandbox);
30 is(Cu.unwaiveXrays(Cu.waiveXrays(fwrapper).prototype), Cu.evalInSandbox("f.prototype", sandbox),
31 ".prototype visible through .wrappedJSObject");
32 is(fwrapper.prototype, undefined, ".prototype invisible through Xrays");
33 ]]>
34 </script>
35 </window>