diff --git a/docshell/test/chrome/test_bug454235.xul b/docshell/test/chrome/test_bug454235.xul index 4e13b89df4a9..88c396f7def2 100644 --- a/docshell/test/chrome/test_bug454235.xul +++ b/docshell/test/chrome/test_bug454235.xul @@ -39,11 +39,11 @@ function doTest() { offScreenBrowser.contentWindow.focus(); ok(offScreenBrowser.contentDocument.hasFocus(),"offscreen browser is not visible"); - offScreenSubBrowser.wrappedJSObject.contentWindow.focus(); - todo(offScreenSubBrowser.wrappedJSObject.contentDocument.hasFocus(),"visible browser in offscreen browser is not visible"); + offScreenSubBrowser.contentWindow.focus(); + todo(offScreenSubBrowser.contentDocument.hasFocus(),"visible browser in offscreen browser is not visible"); - offScreenBurriedBrowser.wrappedJSObject.contentWindow.focus(); - ok(!offScreenBurriedBrowser.wrappedJSObject.contentDocument.hasFocus(),"hidden browser in offscreen browser is visible"); + offScreenBurriedBrowser.contentWindow.focus(); + ok(!offScreenBurriedBrowser.contentDocument.hasFocus(),"hidden browser in offscreen browser is visible"); SimpleTest.finish(); } diff --git a/js/src/xpconnect/tests/chrome/test_bug500931.xul b/js/src/xpconnect/tests/chrome/test_bug500931.xul index e2ff2cb6612d..ff26a5188450 100644 --- a/js/src/xpconnect/tests/chrome/test_bug500931.xul +++ b/js/src/xpconnect/tests/chrome/test_bug500931.xul @@ -26,9 +26,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=500931 function go() { var ifr = document.getElementById("ifr"); var doc = ifr.contentDocument; - ok(doc.toString().indexOf("XPCNativeWrapper") >= 0, "doc is an XPCNativeWrapper"); + ok(doc.toString().indexOf("XrayWrapper") >= 0, "doc is an XrayWrapper"); var weak = Components.utils.getWeakReference(doc); - ok(weak.get().toString().indexOf("XPCNativeWrapper") >= 0, "weak reference returns a wrapper"); + ok(weak.get().toString().indexOf("XrayWrapper") >= 0, "weak reference returns a wrapper"); SimpleTest.finish(); } diff --git a/js/src/xpconnect/tests/chrome/test_bug533596.xul b/js/src/xpconnect/tests/chrome/test_bug533596.xul index ad450f2d0a37..452d8ad7c6b6 100644 --- a/js/src/xpconnect/tests/chrome/test_bug533596.xul +++ b/js/src/xpconnect/tests/chrome/test_bug533596.xul @@ -34,11 +34,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=533596 var win = $('ifr').contentWindow; var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils); - is(utils.getClassName(win), "XPCNativeWrapper", "win is an XPCNW"); + is(utils.getClassName(win), "Proxy", "win is a Proxy"); ok("x" in XPCNativeWrapper.unwrap(win), "actually unwrapped"); - is(utils.getClassName(XPCNativeWrapper.unwrap(win)), "XPCSafeJSObjectWrapper", - "unwrap on an NW returns the same object"); - is(utils.getClassName(XPCNativeWrapper.unwrap(new XPCNativeWrapper(win))), "XPCSafeJSObjectWrapper", + is(utils.getClassName(XPCNativeWrapper.unwrap(win)), "Proxy", + "unwrap on an Proxy returns the same object"); + is(utils.getClassName(XPCNativeWrapper.unwrap(new XPCNativeWrapper(win))), "Proxy", "unwrap on an explicit NW works too"); ok(utils.getClassName(window) !== "XPCNativeWrapper", "window is not a native wrapper"); diff --git a/js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul b/js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul index fd76c9205e8e..d44ae2daf22c 100644 --- a/js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul +++ b/js/src/xpconnect/tests/chrome/test_doublewrappedcompartments.xul @@ -37,7 +37,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=533596 is(typeof readystatechange.QueryInterface, 'function', 'double wrapped'); ok(unwrapped.testme(readystatechange), - 'content didn't get a proxy, but another double wrapped object'); + 'content didn\'t get a proxy, but another double wrapped object'); SimpleTest.finish(); } diff --git a/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul b/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul index 612d31f48546..d09d1cf91632 100644 --- a/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul +++ b/js/src/xpconnect/tests/chrome/test_evalInSandbox.xul @@ -33,14 +33,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=533596 var win = $('ifr').contentWindow; var sandbox = new Cu.Sandbox(win); is(utils.getClassName(sandbox), - "XPCSafeJSObjectWrapper", + "Proxy", "sandbox was wrapped correctly"); sandbox.__proto__ = new XPCNativeWrapper(win); is(utils.getClassName(Cu.evalInSandbox("this.document", sandbox)), - "XPCSafeJSObjectWrapper", + "Proxy", "return value was rewrapped correctly"); - ok(Cu.evalInSandbox("(this.document + '').indexOf('XPCNativeWrapper') >= 0", sandbox), + ok(Cu.evalInSandbox("('wrappedJSObject' in this.document);", sandbox), "wrappers inside eIS are XPCNativeWrappers"); SimpleTest.finish(); diff --git a/js/src/xpconnect/tests/chrome/test_sandboxImport.xul b/js/src/xpconnect/tests/chrome/test_sandboxImport.xul index f465d5c932ce..e050603f9fe2 100644 --- a/js/src/xpconnect/tests/chrome/test_sandboxImport.xul +++ b/js/src/xpconnect/tests/chrome/test_sandboxImport.xul @@ -22,7 +22,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=533596 function checkWrapped(obj) { var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils); - is(utils.getClassName(obj), "XPCSafeJSObjectWrapper", "right type of wrapper"); + is(utils.getClassName(obj), "Proxy", "right type of wrapper"); } var sandbox = new Components.utils.Sandbox("about:blank"); diff --git a/js/src/xpconnect/tests/chrome/test_wrappers.xul b/js/src/xpconnect/tests/chrome/test_wrappers.xul index 14d412986f90..ce30df6068aa 100644 --- a/js/src/xpconnect/tests/chrome/test_wrappers.xul +++ b/js/src/xpconnect/tests/chrome/test_wrappers.xul @@ -27,28 +27,28 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=500931 var win = $('ifr').contentWindow; var utils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils); - todo_is(utils.getClassName(window), "XPCSafeJSObjectWrapper", "our window is wrapped correctly") - todo_is(utils.getClassName(location), "XPCSafeJSObjectWrapper", "our location is wrapped correctly") - is(utils.getClassName(win), "XPCNativeWrapper", "win is an XPCNW"); - is(utils.getClassName(win.location), "XPCNativeWrapper", "deep wrapping works"); + is(utils.getClassName(window), "Proxy", "our window is wrapped correctly") + is(utils.getClassName(location), "Proxy", "our location is wrapped correctly") + is(utils.getClassName(win), "Proxy", "win is an Proxy"); + is(utils.getClassName(win.location), "Proxy", "deep wrapping works"); is(win.location.href, "http://example.org/tests/js/src/xpconnect/tests/mochitest/chrome_wrappers_helper.html", "can still get strings out"); var unsafeWin = win.wrappedJSObject; - is(utils.getClassName(unsafeWin), "XPCSafeJSObjectWrapper", "can get a SJOW"); - is(utils.getClassName(unsafeWin.location), "XPCSafeJSObjectWrapper", "deep wrapping works"); + is(utils.getClassName(unsafeWin), "Proxy", "can get a Proxy"); + is(utils.getClassName(unsafeWin.location), "Proxy", "deep wrapping works"); Object.defineProperty(unsafeWin, "defprop1", { value: 1, writable: true, enumerable: true }); /* TODO (bug 552854): the getter isn't visible in content. function checkWrapper(val) { - ok(utils.getClassName(val) == "XPCSafeJSObjectWrapper", "wrapped properly"); + ok(utils.getClassName(val) == "Proxy", "wrapped properly"); } Object.defineProperty(unsafeWin, "defprop2", { set: checkWrapper, enumerable: true }); */ unsafeWin.run_test(ok, win, unsafeWin); win.setTimeout(function() { - is(utils.getClassName(this), "XPCNativeWrapper", + is(utils.getClassName(this), "Proxy", "this is wrapped correctly"); SimpleTest.finish(); }, 0) diff --git a/js/src/xpconnect/tests/mochitest/chrome_wrappers_helper.html b/js/src/xpconnect/tests/mochitest/chrome_wrappers_helper.html index 4f7170eb1cc7..746f64d743aa 100644 --- a/js/src/xpconnect/tests/mochitest/chrome_wrappers_helper.html +++ b/js/src/xpconnect/tests/mochitest/chrome_wrappers_helper.html @@ -15,10 +15,10 @@ } function run_test(ok, xpcnw, sjow) { // both wrappers should point to our window: XOW - check_wrapper(ok, ok, "Function", "functions are wrapped properly") + check_wrapper(ok, ok, "Proxy", "functions are wrapped properly") check_parent(ok, ok, window, "ok is parented correctly"); - check_wrapper(ok, xpcnw, "XPCCrossOriginWrapper", "XPCNWs are transformed correctly"); - check_wrapper(ok, sjow, "XPCCrossOriginWrapper", "SJOWs are transformed correctly"); + check_wrapper(ok, xpcnw, "Proxy", "XPCNWs are transformed correctly"); + check_wrapper(ok, sjow, "Proxy", "SJOWs are transformed correctly"); ok(defprop1 === 1, "defprop1 exists"); window.defprop1 = 2; diff --git a/toolkit/content/tests/chrome/window_browser_drop.xul b/toolkit/content/tests/chrome/window_browser_drop.xul index a1f0972cbb6e..fb31c4556a63 100644 --- a/toolkit/content/tests/chrome/window_browser_drop.xul +++ b/toolkit/content/tests/chrome/window_browser_drop.xul @@ -52,14 +52,14 @@ function runTest() }); // stopPropagation should not prevent the browser link handling from occuring - frames[1].stopMode = true; + frames[1].wrappedJSObject.stopMode = true; var body = document.getElementById("contentchild").contentDocument.body; expectLink(body, "http://www.mozilla.org", "http://www.mozilla.org", [ [ { type: "text/uri-list", data: "http://www.mozilla.org" } ] ], "text/x-moz-url drop on browser with stopPropagation drop event"); // canceling the event, however, should prevent the link from being handled - frames[1].cancelMode = true; + frames[1].wrappedJSObject.cancelMode = true; expectLink(body, "", "", [ [ { type: "text/uri-list", data: "http://www.example.org" } ] ], "text/x-moz-url drop on browser with cancelled drop event");