Bug 1330464 - script-generated removal of additional parameters that don't exist in the interface, r=jaws.
authorFlorian Quèze <florian@queze.net>
Fri, 13 Jan 2017 20:21:53 +0100
changeset 374406 9d508a7deecf6b59a7065853838625934a5db051
parent 374405 c90ec782d481f05f5848f171a945cfc5bcf5b0ca
child 374407 100507e98842717688a28cbb5ce3decc108397ee
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1330464
milestone53.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 1330464 - script-generated removal of additional parameters that don't exist in the interface, r=jaws.
browser/base/content/test/tabPrompts/browser_openPromptInBackgroundTab.js
browser/components/newtab/aboutNewTabService.js
browser/modules/test/browser_UsageTelemetry_urlbar.js
devtools/client/webconsole/net/test/mochitest/head.js
services/sync/tests/unit/test_fxa_startOver.js
testing/specialpowers/content/SpecialPowersObserverAPI.js
toolkit/components/osfile/tests/xpcshell/test_shutdown.js
toolkit/content/browser-content.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
toolkit/mozapps/extensions/test/xpcshell/test_startup.js
--- a/browser/base/content/test/tabPrompts/browser_openPromptInBackgroundTab.js
+++ b/browser/base/content/test/tabPrompts/browser_openPromptInBackgroundTab.js
@@ -1,15 +1,15 @@
 "use strict";
 
 const ROOT = getRootDirectory(gTestPath).replace("chrome://mochitests/content/", "http://example.com/");
 let pageWithAlert = ROOT + "openPromptOffTimeout.html";
 
 registerCleanupFunction(function() {
-  Services.perms.removeAll(makeURI(pageWithAlert));
+  Services.perms.removeAll();
 });
 
 /*
  * This test opens a tab that alerts when it is hidden. We then switch away
  * from the tab, and check that by default the tab is not automatically
  * re-selected. We also check that a checkbox appears in the alert that allows
  * the user to enable this automatically re-selecting. We then check that
  * checking the checkbox does actually enable that behaviour.
--- a/browser/components/newtab/aboutNewTabService.js
+++ b/browser/components/newtab/aboutNewTabService.js
@@ -167,17 +167,17 @@ AboutNewTabService.prototype = {
    * Generate a default url based on remote mode, version, locale and update channel
    */
   generateRemoteURL() {
     let releaseName = this.releaseFromUpdateChannel(UpdateUtils.UpdateChannel);
     let path = REMOTE_NEWTAB_PATH
       .replace("%VERSION%", this.remoteVersion)
       .replace("%LOCALE%", Locale.getLocale())
       .replace("%CHANNEL%", releaseName);
-    let mode = Services.prefs.getCharPref(PREF_REMOTE_MODE, "production");
+    let mode = Services.prefs.getCharPref(PREF_REMOTE_MODE);
     if (!(mode in NewTabRemoteResources.MODE_CHANNEL_MAP)) {
       mode = "production";
     }
     return NewTabRemoteResources.MODE_CHANNEL_MAP[mode].origin + path;
   },
 
   /*
    * Returns the default URL.
@@ -224,17 +224,17 @@ AboutNewTabService.prototype = {
     return VALID_CHANNELS.has(channelName) ? channelName : "nightly";
   },
 
   get newTabURL() {
     return this._newTabURL;
   },
 
   get remoteVersion() {
-    return Services.prefs.getCharPref(PREF_REMOTE_VERSION, "1");
+    return Services.prefs.getCharPref(PREF_REMOTE_VERSION);
   },
 
   get remoteReleaseName() {
     return this.releaseFromUpdateChannel(UpdateUtils.UpdateChannel);
   },
 
   set newTabURL(aNewTabURL) {
     let csTest = Services.prefs.getBoolPref(PREF_REMOTE_CS_TEST);
--- a/browser/modules/test/browser_UsageTelemetry_urlbar.js
+++ b/browser/modules/test/browser_UsageTelemetry_urlbar.js
@@ -84,17 +84,17 @@ add_task(function* setup() {
   // Enable event recording for the events tested here.
   Services.telemetry.setEventRecordingEnabled("navigation", true);
 
   // Make sure to restore the engine once we're done.
   registerCleanupFunction(function* () {
     Services.telemetry.canRecordExtended = oldCanRecord;
     Services.search.currentEngine = originalEngine;
     Services.search.removeEngine(engine);
-    Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF, true);
+    Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF);
     Services.prefs.clearUserPref(ONEOFF_URLBAR_PREF);
     yield PlacesTestUtils.clearHistory();
     Services.telemetry.setEventRecordingEnabled("navigation", false);
   });
 });
 
 add_task(function* test_simpleQuery() {
   // Let's reset the counts.
--- a/devtools/client/webconsole/net/test/mochitest/head.js
+++ b/devtools/client/webconsole/net/test/mochitest/head.js
@@ -16,18 +16,18 @@ const FRAME_SCRIPT_UTILS_URL =
 const NET_INFO_PREF = "devtools.webconsole.filter.networkinfo";
 const NET_XHR_PREF = "devtools.webconsole.filter.netxhr";
 
 // Enable XHR logging for the test
 Services.prefs.setBoolPref(NET_INFO_PREF, true);
 Services.prefs.setBoolPref(NET_XHR_PREF, true);
 
 registerCleanupFunction(() => {
-  Services.prefs.clearUserPref(NET_INFO_PREF, true);
-  Services.prefs.clearUserPref(NET_XHR_PREF, true);
+  Services.prefs.clearUserPref(NET_INFO_PREF);
+  Services.prefs.clearUserPref(NET_XHR_PREF);
 });
 
 // Use the old webconsole since the new one doesn't yet support
 // XHR spy. See Bug 1304794.
 Services.prefs.setBoolPref("devtools.webconsole.new-frontend-enabled", false);
 registerCleanupFunction(function* () {
   Services.prefs.clearUserPref("devtools.webconsole.new-frontend-enabled");
 });
--- a/services/sync/tests/unit/test_fxa_startOver.js
+++ b/services/sync/tests/unit/test_fxa_startOver.js
@@ -7,17 +7,17 @@ Cu.import("resource://services-sync/brow
 Cu.import("resource://services-sync/service.js");
 
 function run_test() {
   initTestLogging("Trace");
   run_next_test();
 }
 
 add_task(async function test_startover() {
-  let oldValue = Services.prefs.getBoolPref("services.sync-testing.startOverKeepIdentity", true);
+  let oldValue = Services.prefs.getBoolPref("services.sync-testing.startOverKeepIdentity");
   Services.prefs.setBoolPref("services.sync-testing.startOverKeepIdentity", false);
 
   ensureLegacyIdentityManager();
   await configureIdentity({username: "johndoe"});
 
   // The boolean flag on the xpcom service should reflect a legacy provider.
   let xps = Cc["@mozilla.org/weave/service;1"]
             .getService(Components.interfaces.nsISupports)
--- a/testing/specialpowers/content/SpecialPowersObserverAPI.js
+++ b/testing/specialpowers/content/SpecialPowersObserverAPI.js
@@ -378,17 +378,17 @@ SpecialPowersObserverAPI.prototype = {
             break;
           case "remove":
             Services.perms.removeFromPrincipal(principal, msg.type);
             break;
           case "has":
             let hasPerm = Services.perms.testPermissionFromPrincipal(principal, msg.type);
             return hasPerm == Ci.nsIPermissionManager.ALLOW_ACTION;
           case "test":
-            let testPerm = Services.perms.testPermissionFromPrincipal(principal, msg.type, msg.value);
+            let testPerm = Services.perms.testPermissionFromPrincipal(principal, msg.type);
             return testPerm == msg.value;
           default:
             throw new SpecialPowersError(
               "Invalid operation for SPPermissionManager");
         }
         return undefined;	// See comment at the beginning of this function.
       }
 
--- a/toolkit/components/osfile/tests/xpcshell/test_shutdown.js
+++ b/toolkit/components/osfile/tests/xpcshell/test_shutdown.js
@@ -62,17 +62,17 @@ add_task(function system_shutdown() {
         resolved = true;
       } catch (ex if ex == "timeout") {
         resolved = false;
       }
       Services.console.unregisterListener(observer);
       Services.prefs.clearUserPref("toolkit.osfile.log");
       Services.prefs.clearUserPref("toolkit.osfile.log.redirect");
       Services.prefs.clearUserPref("toolkit.osfile.test.shutdown.observer");
-      Services.prefs.clearUserPref("toolkit.async_shutdown.testing", true);
+      Services.prefs.clearUserPref("toolkit.async_shutdown.testing");
 
       throw new Task.Result(resolved);
     });
   }
 
   let TEST_DIR = OS.Path.join((yield OS.File.getCurrentDirectory()), "..");
   do_print("Testing for leaks of directory iterator " + TEST_DIR);
   let iterator = new OS.File.DirectoryIterator(TEST_DIR);
--- a/toolkit/content/browser-content.js
+++ b/toolkit/content/browser-content.js
@@ -417,18 +417,18 @@ var Printing = {
   ],
 
   init() {
     this.MESSAGES.forEach(msgName => addMessageListener(msgName, this));
     addEventListener("PrintingError", this, true);
   },
 
   get shouldSavePrintSettings() {
-    return Services.prefs.getBoolPref("print.use_global_printsettings", false) &&
-           Services.prefs.getBoolPref("print.save_print_settings", false);
+    return Services.prefs.getBoolPref("print.use_global_printsettings") &&
+           Services.prefs.getBoolPref("print.save_print_settings");
   },
 
   handleEvent(event) {
     if (event.type == "PrintingError") {
       let win = event.target.defaultView;
       let wbp = win.QueryInterface(Ci.nsIInterfaceRequestor)
                    .getInterface(Ci.nsIWebBrowserPrint);
       let nsresult = event.detail;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
@@ -62,17 +62,17 @@ function load_blocklist(aFile, aCallback
 
   Services.prefs.setCharPref("extensions.blocklist.url", "http://localhost:" +
                              gPort + "/data/" + aFile);
   var blocklist = Cc["@mozilla.org/extensions/blocklist;1"].
                   getService(Ci.nsITimerCallback);
   // if we're not using the blocklist.xml for certificate blocklist state,
   // ensure that kinto update is enabled
   if (!Services.prefs.getBoolPref("security.onecrl.via.amo")) {
-    ok(Services.prefs.getBoolPref("services.blocklist.update_enabled", false),
+    ok(Services.prefs.getBoolPref("services.blocklist.update_enabled"),
                                   "Kinto update should be enabled");
   }
   blocklist.notify(null);
 }
 
 
 function end_test() {
   testserver.stop(do_test_finished);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_startup.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_startup.js
@@ -638,17 +638,17 @@ function run_test_8() {
     do_check_false(isExtensionInAddonsList(globalDir, "addon2@tests.mozilla.org"));
 
     do_execute_soon(run_test_9);
   });
 }
 
 // More hiding and revealing
 function run_test_9() {
-  Services.prefs.clearUserPref("extensions.enabledScopes", 0);
+  Services.prefs.clearUserPref("extensions.enabledScopes");
 
   var dest = userDir.clone();
   dest.append(do_get_expected_addon_name("addon1@tests.mozilla.org"));
   dest.remove(true);
   dest = globalDir.clone();
   dest.append(do_get_expected_addon_name("addon2@tests.mozilla.org"));
   dest.remove(true);
   addon2.version = "2.4";