diff --git a/js/xpconnect/tests/chrome/test_wrappers.xul b/js/xpconnect/tests/chrome/test_wrappers.xul index 6f59f2383ea1..69da0e0a4a14 100644 --- a/js/xpconnect/tests/chrome/test_wrappers.xul +++ b/js/xpconnect/tests/chrome/test_wrappers.xul @@ -75,7 +75,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=500931 // Test QI on new dom bindings. try { - var QIed = win.QueryInterface(Ci.nsIClassInfo); + var QIed = win.document.documentElement.QueryInterface(Ci.nsIClassInfo); ok(false, "Should throw for new binding objects not having classinfo"); } catch(e) { is(e.name, "NS_NOINTERFACE", "Threw while QI-ing on wrapper"); diff --git a/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html b/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html index 51e343b44236..989db4e5e3a9 100644 --- a/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html +++ b/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html @@ -82,9 +82,15 @@ async function starttest(){ // QueryInterface and getPrivilegedProps tests is(SpecialPowers.can_QI(SpecialPowers), false); - ok(SpecialPowers.can_QI(window)); - ok(SpecialPowers.do_QueryInterface(window, "nsIDOMWindow")); - is(SpecialPowers.getPrivilegedProps(SpecialPowers.do_QueryInterface(window, "nsIDOMWindow"), "document.nodeName"), "#document"); + let doc = SpecialPowers.wrap(document); + is(SpecialPowers.getPrivilegedProps(doc, "baseURIObject.fileName"), null, + "Should not have a fileName property yet"); + let uri = SpecialPowers.getPrivilegedProps(doc, "baseURIObject"); + ok(SpecialPowers.can_QI(uri)); + ok(SpecialPowers.do_QueryInterface(uri, "nsIURL")); + is(SpecialPowers.getPrivilegedProps(doc, "baseURIObject.fileName"), + "test_SpecialPowersExtension.html", + "Should have a fileName property now"); //try to run garbage collection SpecialPowers.gc();