Bug 792808 - Change test_SpecialPowersExtension.html to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=mrbkap
authorThomas Wisniewski <wisniewskit@gmail.com>
Tue, 19 Sep 2017 12:18:59 -0400
changeset 404230 b4d46a5196fec93a482cbbd00cf5d4d7018f2206
parent 404229 89ffff270fb7da538c09f3d38690e6da4bcfe616
child 404231 a4b33f7c71beb35c9693dfe0b6faf2d9e3493006
push id99968
push userrgurzau@mozilla.com
push dateFri, 16 Feb 2018 22:14:56 +0000
treeherdermozilla-inbound@2e16779c96cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs792808
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 792808 - Change test_SpecialPowersExtension.html to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=mrbkap MozReview-Commit-ID: JW37fmAuxE2
testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html
--- a/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html
+++ b/testing/mochitest/tests/Harness_sanity/test_SpecialPowersExtension.html
@@ -87,19 +87,18 @@ function starttest(){
   
   //try to run garbage collection
   SpecialPowers.gc();
 
   //
   // Test the SpecialPowers wrapper.
   //
 
-  // Try some basic stuff with XHR.
-  var xhr2 = SpecialPowers.Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(SpecialPowers.Ci.nsIXMLHttpRequest);
-  is(xhr2.readyState, XMLHttpRequest.UNSENT, "Should be able to get props off privileged objects");
+  let fp = SpecialPowers.Cc["@mozilla.org/filepicker;1"].createInstance(SpecialPowers.Ci.nsIFilePicker);
+  is(fp.mode, SpecialPowers.Ci.nsIFilePicker.modeOpen, "Should be able to get props off privileged objects");
   var testURI = SpecialPowers.Cc['@mozilla.org/network/standard-url-mutator;1']
                              .createInstance(SpecialPowers.Ci.nsIURIMutator)
                              .setSpec("http://www.foobar.org/")
                              .finalize();
   is(testURI.spec, "http://www.foobar.org/", "Getters/Setters should work correctly");
   is(SpecialPowers.wrap(document).getElementsByTagName('details').length, 0, "Should work with proxy-based DOM bindings.");
 
   // Play with the window object.