Backout cfd6bf0fe1e9 as it includes an unwanted chunk
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 30 Mar 2012 09:53:50 -0700
changeset 90739 d88f380468eefcbe8a60acbbeea1a225d7c10d75
parent 90738 7b813cc009ce70a20f1f1a029315560a12492d04
child 90740 2a60f25594898d57ea271b1a0b1c191c7ac66fc4
push id22382
push userbmo@edmorley.co.uk
push dateSat, 31 Mar 2012 21:44:34 +0000
treeherdermozilla-central@bbe5086163c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone14.0a1
backs outcfd6bf0fe1e9ed29f72957d98eda997bc77806a3
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
Backout cfd6bf0fe1e9 as it includes an unwanted chunk
content/base/test/test_bug383430.html
content/base/test/test_bug393968.html
content/base/test/test_bug397234.html
content/base/test/test_bug413974.html
content/base/test/test_bug422537.html
content/base/test/test_bug431701.html
content/base/test/test_bug475156.html
content/base/test/test_xhr_forbidden_headers.html
--- a/content/base/test/test_bug383430.html
+++ b/content/base/test/test_bug383430.html
@@ -20,13 +20,13 @@ https://bugzilla.mozilla.org/show_bug.cg
 /** Test for Bug 383430 **/
 netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 
 var req = new XMLHttpRequest();
 req.mozBackgroundRequest = true;
 req.open("GET", window.location.href);
 req.send(null);
 
-ok(SpecialPowers.wrap(req).channel.loadGroup == null, "loadGroup is null");
+ok(req.channel.loadGroup == null, "loadGroup is null");
 </script>
 </pre>
 </body>
 </html>
--- a/content/base/test/test_bug393968.html
+++ b/content/base/test/test_bug393968.html
@@ -18,17 +18,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 393968 **/
 var req = new XMLHttpRequest();
 req.open("POST", window.location.href);
 req.setRequestHeader("Content-Type", "text/plain; charset=us-ascii; boundary=01234567890");
 req.send("Some text");
 
-is(SpecialPowers.wrap(req).channel
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+is(req.channel
       .QueryInterface(Components.interfaces.nsIHttpChannel)
       .getRequestHeader("Content-Type"),
    "text/plain; charset=UTF-8; boundary=01234567890",
    "Headers should match");
 
 </script>
 </pre>
 </body>
--- a/content/base/test/test_bug397234.html
+++ b/content/base/test/test_bug397234.html
@@ -19,17 +19,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 /** Test for Bug 397234 **/
 var req = new XMLHttpRequest();
 req.open("POST", window.location.href);
 // Capitalization of charet param is on purpose!
 req.setRequestHeader("Content-Type", "text/plain; charset='uTf-8'");
 req.send("Some text");
 
-is(SpecialPowers.wrap(req).channel
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+is(req.channel
       .QueryInterface(Components.interfaces.nsIHttpChannel)
       .getRequestHeader("Content-Type"),
    "text/plain; charset='uTf-8'",
    "Headers should match");
 
 </script>
 </pre>
 </body>
--- a/content/base/test/test_bug413974.html
+++ b/content/base/test/test_bug413974.html
@@ -18,17 +18,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 413974 **/
 var req = new XMLHttpRequest();
 req.open("POST", window.location.href);
 req.setRequestHeader("Content-Type", "text/plain; boundary=01234567890");
 req.send("Some text");
 
-is(SpecialPowers.wrap(req).channel
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+is(req.channel
       .QueryInterface(Components.interfaces.nsIHttpChannel)
       .getRequestHeader("Content-Type"),
    "text/plain; charset=UTF-8; boundary=01234567890",
    "Charset should come before boundary");
 </script>
 </pre>
 </body>
 </html>
--- a/content/base/test/test_bug422537.html
+++ b/content/base/test/test_bug422537.html
@@ -31,17 +31,17 @@ var body = [
   "foo",
   isupports_string
 ];
 
 for each (var i in body) {
   var xhr = new XMLHttpRequest();
   xhr.open("POST", url, true);
   xhr.send(i);
-  var chan = SpecialPowers.wrap(xhr).channel;
+  var chan = xhr.channel;
   if (!(chan instanceof Components.interfaces.nsIUploadChannel))
     throw "Must be an upload channel";
   var stream = chan.uploadStream;
   if (!stream || !(stream instanceof Components.interfaces.nsISeekableStream))
     throw "Stream must be seekable";
   // the following is a no-op, but should not throw an exception
   stream.seek(Components.interfaces.nsISeekableStream.NS_SEEK_CUR, 0);
 }
--- a/content/base/test/test_bug431701.html
+++ b/content/base/test/test_bug431701.html
@@ -93,17 +93,18 @@ addLoadEvent(function() {
   for (var i = 0; i < tests.length; ++i) {
     doTest(i);
   }
 
   // Now check what xhr does
   var xhr = new XMLHttpRequest();
   xhr.open("POST", document.location.href);
   xhr.send(createDoc());
-  is(SpecialPowers.wrap(xhr).channel.QueryInterface(Components.interfaces.nsIHttpChannel)
+  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+  is(xhr.channel.QueryInterface(Components.interfaces.nsIHttpChannel)
                 .getRequestHeader("Content-Type"),
      "application/xml; charset=UTF-8", "Testing correct type on the wire");
   xhr.abort();
                      
   SimpleTest.finish();
 });
 
 
--- a/content/base/test/test_bug475156.html
+++ b/content/base/test/test_bug475156.html
@@ -12,17 +12,18 @@ https://bugzilla.mozilla.org/show_bug.cg
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
 
 var path = "http://mochi.test:8888/tests/content/base/test/";
 
 function fromCache(xhr)
 {
-  var ch = SpecialPowers.wrap(xhr).channel.QueryInterface(Components.interfaces.nsICachingChannel);
+  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+  var ch = xhr.channel.QueryInterface(Components.interfaces.nsICachingChannel);
   return ch.isFromCache();  
 }
 
 var tests = [
   // First just init the file with an ETag
   {
     init: function(xhr) 
     {
--- a/content/base/test/test_xhr_forbidden_headers.html
+++ b/content/base/test/test_xhr_forbidden_headers.html
@@ -50,37 +50,37 @@ var i, request;
 
 // Try setting headers in unprivileged context
 request = new XMLHttpRequest();
 request.open("GET", window.location.href);
 for (i = 0; i < headers.length; i++)
   request.setRequestHeader(headers[i], "test" + i);
 
 // Read out headers
-var channel = SpecialPowers.wrap(request).channel.QueryInterface(Components.interfaces.nsIHttpChannel);
+netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+var channel = request.channel.QueryInterface(Components.interfaces.nsIHttpChannel);
 for (i = 0; i < headers.length; i++) {
   // Retrieving Content-Length will throw an exception
   var value = null;
   try {
     value = channel.getRequestHeader(headers[i]);
   }
   catch(e) {}
 
   isnot(value, "test" + i, "Setting " + headers[i] + " header in unprivileged context");
 }
 
 // Try setting headers in privileged context
-netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
 request = new XMLHttpRequest();
 request.open("GET", window.location.href);
 for (i = 0; i < headers.length; i++)
   request.setRequestHeader(headers[i], "test" + i);
 
 // Read out headers
-var channel = SpecialPowers.wrap(request).channel.QueryInterface(Components.interfaces.nsIHttpChannel);
+var channel = request.channel.QueryInterface(Components.interfaces.nsIHttpChannel);
 for (i = 0; i < headers.length; i++) {
   var value = channel.getRequestHeader(headers[i]);
   is(value, "test" + i, "Setting " + headers[i] + " header in privileged context");
 }
 </script>
 </pre>
 </body>
 </html>