Bug 841413 - Part 2: Don't call enablePrivilege needlessly in localstorage Private Browsing tests; r=jdm
authorEhsan Akhgari <ehsan@mozilla.com>
Sat, 23 Feb 2013 01:51:06 -0500
changeset 122768 195e706140d19f4d777e36026c54a21fd9e24ab7
parent 122767 e42d9a3abf17bfc1ef310362cf7918bcf5fd456a
child 122769 0d0071a94fe9ed2ae93a1a05705ce747fc434fb4
child 122770 7aebc1dec8f191876aa3f48f5d01b724d1edd193
push id24356
push usergszorc@mozilla.com
push dateSun, 24 Feb 2013 01:00:12 +0000
treeherdermozilla-central@195e706140d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
bugs841413
milestone22.0a1
first release with
nightly linux32
195e706140d1 / 22.0a1 / 20130224031053 / files
nightly linux64
195e706140d1 / 22.0a1 / 20130224031053 / files
nightly mac
195e706140d1 / 22.0a1 / 20130224031053 / files
nightly win32
195e706140d1 / 22.0a1 / 20130224031053 / files
nightly win64
195e706140d1 / 22.0a1 / 20130224031053 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 841413 - Part 2: Don't call enablePrivilege needlessly in localstorage Private Browsing tests; r=jdm
dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html
dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html
--- a/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageBasePrivateBrowsing_perwindowpb.html
@@ -11,17 +11,16 @@ const Ci = Components.interfaces;
 var mainWindow;
 
 var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
                            .getService(Components.interfaces.nsIPrefBranch);
 prefBranch.setIntPref("browser.startup.page", 0);
 prefBranch.setCharPref("browser.startup.homepage_override.mstone", "ignore");
 
 function startTest() {
-  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
   mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIWebNavigation)
                       .QueryInterface(Ci.nsIDocShellTreeItem)
                       .rootTreeItem
                       .QueryInterface(Ci.nsIInterfaceRequestor)
                       .getInterface(Ci.nsIDOMWindow);
 
   doTest();
--- a/dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html
+++ b/dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing_perwindowpb.html
@@ -3,18 +3,16 @@
 <title>localStorage and DOM quota test</title>
 
 <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
 
 <script type="text/javascript">
 SimpleTest.waitForExplicitFinish();
 
-netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
 Components.utils.import("resource://gre/modules/Services.jsm");
 
 const Ci = Components.interfaces;
 const CONTENT_PAGE = "http://mochi.test:8888/chrome/dom/tests/mochitest/localstorage/page_blank.html";
 const slavePath = "/tests/dom/tests/mochitest/localstorage/";
 var currentTest = 1;
 var quota;
 
@@ -45,18 +43,16 @@ function startTest() {
     }, false);
     slave = aWindow.content.frames[0];
 
     SimpleTest.waitForFocus(function() doNextTest(aWindow), aWindow);
   });
 }
 
 function doNextTest(aWindow) {
-  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-
   info("Running test: " + currentTest);
   switch (currentTest) {
     // Initialy setup the quota to testing value of 1024B and
     // set a 500 bytes key with name length 1 (allocate 501 bytes)
     case 1:
       slaveOrigin = "http://example.com";
       slave.location = slaveOrigin + slavePath + "frameQuota.html?add&A&success";
       break;