Bug 1178041 - fix incorrect use of built-in |arguments| function as an argument name. r=mak
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Mon, 06 Jul 2015 09:38:00 +0200
changeset 251538 a8e32a9f40ba87f5c6b7dcc1b00fa2a7346503ba
parent 251537 80c8a1b9a66dede193ed95b5c121e4fdff407e1e
child 251539 81993d7787280ce9422c4e58013357070950a810
push id13880
push usercbook@mozilla.com
push dateTue, 07 Jul 2015 09:08:03 +0000
treeherderfx-team@a8e32a9f40ba [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1178041
milestone42.0a1
Bug 1178041 - fix incorrect use of built-in |arguments| function as an argument name. r=mak
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_metadata_filters.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_prefs.js
toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
toolkit/mozapps/extensions/test/xpcshell/test_bug393285.js
toolkit/mozapps/extensions/test/xpcshell/test_bug406118.js
toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js
toolkit/mozapps/extensions/test/xpcshell/test_bug542391.js
toolkit/mozapps/extensions/test/xpcshell/test_bug594058.js
toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js
toolkit/mozapps/extensions/test/xpcshell/test_metadata_update.js
toolkit/mozapps/extensions/test/xpcshell/test_signed_migrate.js
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_metadata_filters.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_metadata_filters.js
@@ -19,22 +19,22 @@ gPort = testserver.identity.primaryPort;
 mapFile("/data/test_blocklist_metadata_filters_1.xml", testserver);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
-    var list = arguments.wrappedJSObject.list;
+    var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     //run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_prefs.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_prefs.js
@@ -25,22 +25,22 @@ mapFile("/data/test_blocklist_prefs_1.xm
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // A window watcher to handle the blocklist UI.
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
-    var list = arguments.wrappedJSObject.list;
+    var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     //run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_blocklist_regexp.js
@@ -20,22 +20,22 @@ gPort = testserver.identity.primaryPort;
 mapFile("/data/test_blocklist_regexp_1.xml", testserver);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
-    var list = arguments.wrappedJSObject.list;
+    var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     //run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug393285.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug393285.js
@@ -32,22 +32,22 @@ let addonIDs = ["test_bug393285_1@tests.
                 "test_bug393285_10@tests.mozilla.org",
                 "test_bug393285_11@tests.mozilla.org",
                 "test_bug393285_12@tests.mozilla.org",
                 "test_bug393285_13@tests.mozilla.org",
                 "test_bug393285_14@tests.mozilla.org"];
 
 // A window watcher to deal with the blocklist UI dialog.
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
-    var list = arguments.wrappedJSObject.list;
+    var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     //run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug406118.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug406118.js
@@ -21,22 +21,22 @@ gPort = testserver.identity.primaryPort;
 // register static files with server and interpolate port numbers in them
 mapFile("/data/test_bug393285.xml", testserver);
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // A window watcher to deal with the blocklist UI dialog.
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
 
     // Simulate auto-disabling any softblocks
-    var list = arguments.wrappedJSObject.list;
+    var list = args.wrappedJSObject.list;
     list.forEach(function(aItem) {
       if (!aItem.blocked)
         aItem.disable = true;
     });
 
     //run the code after the blocklist is closed
     Services.obs.notifyObservers(null, "addon-blocklist-closed", null);
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug449027.js
@@ -248,22 +248,22 @@ var PluginHost = {
 
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
     do_check_neq(gCallback, null);
 
-    var args = arguments.wrappedJSObject;
+    var args = args.wrappedJSObject;
 
     gNewBlocks = [];
     var list = args.list;
     for (let listItem of list)
       gNewBlocks.push(listItem.name + " " + listItem.version);
 
     // Call the callback after the blocklist has finished up
     do_timeout(0, gCallback);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug514327_3.js
@@ -55,23 +55,23 @@ var PluginHost = {
   
     throw Components.results.NS_ERROR_NO_INTERFACE;
   }
 }
 
 // Don't need the full interface, attempts to call other methods will just
 // throw which is just fine
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     // Should be called to list the newly blocklisted items
     do_check_eq(url, URI_EXTENSION_BLOCKLIST_DIALOG);
     // Should only include one item
-    do_check_eq(arguments.wrappedJSObject.list.length, 1);
+    do_check_eq(args.wrappedJSObject.list.length, 1);
     // And that item should be the blocked plugin, not the outdated one
-    var item = arguments.wrappedJSObject.list[0];
+    var item = args.wrappedJSObject.list[0];
     do_check_true(item.item instanceof Ci.nsIPluginTag);
     do_check_neq(item.name, "test_bug514327_outdated");
 
     // Call the next test after the blocklist has finished up
     do_timeout(0, gNextTestPart);
   },
 
   QueryInterface: function(iid) {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug542391.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug542391.js
@@ -22,24 +22,24 @@ const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 var gInstallUpdate = false;
 var gCheckUpdates = false;
 
 // This will be called to show the compatibility update dialog.
 var WindowWatcher = {
   expected: false,
-  arguments: null,
+  args: null,
 
   openWindow: function(parent, url, name, features, args) {
     do_check_true(Services.startup.interrupted);
     do_check_eq(url, URI_EXTENSION_UPDATE_DIALOG);
     do_check_true(this.expected);
     this.expected = false;
-    this.arguments = args.QueryInterface(AM_Ci.nsIVariant);
+    this.args = args.QueryInterface(AM_Ci.nsIVariant);
 
     var updated = !gCheckUpdates;
     if (gCheckUpdates) {
       AddonManager.getAddonByID("override1x2-1x3@tests.mozilla.org", function(a6) {
         a6.findUpdates({
           onUpdateFinished: function() {
             AddonManagerPrivate.removeStartupChange("disabled", "override1x2-1x3@tests.mozilla.org");
             updated = true;
@@ -382,19 +382,19 @@ add_task(function* run_test_1() {
   let addons = yield promiseAddonsByIDs(["min1max1@tests.mozilla.org",
                                          "min1max2@tests.mozilla.org",
                                          "upgradeable1x2-3@tests.mozilla.org",
                                          "min1max3@tests.mozilla.org",
                                          "min1max3b@tests.mozilla.org",
                                          "override1x2-1x3@tests.mozilla.org"]);
   check_state_v3(addons);
 
-  do_check_eq(WindowWatcher.arguments.length, 2);
-  do_check_true(WindowWatcher.arguments.indexOf("upgradeable1x2-3@tests.mozilla.org") >= 0);
-  do_check_true(WindowWatcher.arguments.indexOf("override1x2-1x3@tests.mozilla.org") >= 0);
+  do_check_eq(WindowWatcher.args.length, 2);
+  do_check_true(WindowWatcher.args.indexOf("upgradeable1x2-3@tests.mozilla.org") >= 0);
+  do_check_true(WindowWatcher.args.indexOf("override1x2-1x3@tests.mozilla.org") >= 0);
 });
 
 // Downgrade to version 2 which will remove appDisable from two add-ons
 // Still displays the compat window, because metadata is not recently updated
 add_task(function* run_test_2() {
   WindowWatcher.expected = true;
   yield promiseRestartManager("2");
   check_startup_changes("installed", []);
@@ -435,18 +435,18 @@ add_task(function* run_test_5() {
   let addons = yield promiseAddonsByIDs(["min1max1@tests.mozilla.org",
                                          "min1max2@tests.mozilla.org",
                                          "upgradeable1x2-3@tests.mozilla.org",
                                          "min1max3@tests.mozilla.org",
                                          "min1max3b@tests.mozilla.org",
                                          "override1x2-1x3@tests.mozilla.org"]);
   check_state_v3_2(addons);
 
-  do_check_eq(WindowWatcher.arguments.length, 1);
-  do_check_true(WindowWatcher.arguments.indexOf("upgradeable1x2-3@tests.mozilla.org") >= 0);
+  do_check_eq(WindowWatcher.args.length, 1);
+  do_check_true(WindowWatcher.args.indexOf("upgradeable1x2-3@tests.mozilla.org") >= 0);
 });
 
 // Downgrade to version 1 which will appEnable all the add-ons
 // except upgradeable1x2-3; the update we installed isn't compatible with 1
 add_task(function* run_test_6() {
   WindowWatcher.expected = true;
   yield promiseRestartManager("1");
   check_startup_changes("installed", []);
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug594058.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug594058.js
@@ -15,17 +15,17 @@ Components.utils.import("resource://test
 const Ci = Components.interfaces;
 const extDir = gProfD.clone();
 extDir.append("extensions");
 
 var gCachePurged = false;
 
 // Override the window watcher
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     do_check_false(gCachePurged);
   },
 
   QueryInterface: function(iid) {
     if (iid.equals(Ci.nsIWindowWatcher)
      || iid.equals(Ci.nsISupports))
       return this;
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug596343.js
@@ -12,17 +12,17 @@ Components.utils.import("resource://test
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 var gExpectedURL = null;
 
 // This will be called to show the any update dialog.
 var WindowWatcher = {
-  openWindow: function(parent, url, name, features, arguments) {
+  openWindow: function(parent, url, name, features, args) {
     do_check_eq(url, gExpectedURL);
     gExpectedURL = null;
   },
 
   QueryInterface: function(iid) {
     if (iid.equals(AM_Ci.nsIWindowWatcher)
      || iid.equals(AM_Ci.nsISupports))
       return this;
--- a/toolkit/mozapps/extensions/test/xpcshell/test_metadata_update.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_metadata_update.js
@@ -33,17 +33,16 @@ Cu.import("resource://testing-common/Moc
 var testserver;
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // This will be called to show the compatibility update dialog.
 var WindowWatcher = {
   expected: false,
-  arguments: null,
 
   openWindow: function(parent, url, name, features, args) {
     do_check_true(Services.startup.interrupted);
     do_check_eq(url, URI_EXTENSION_UPDATE_DIALOG);
     do_check_true(this.expected);
     this.expected = false;
   },
 
--- a/toolkit/mozapps/extensions/test/xpcshell/test_signed_migrate.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_signed_migrate.js
@@ -22,18 +22,18 @@ const ID = "test@tests.mozilla.org";
 
 const profileDir = gProfD.clone();
 profileDir.append("extensions");
 
 // Override the window watcher
 var WindowWatcher = {
   sawAddon: false,
 
-  openWindow: function(parent, url, name, features, arguments) {
-    let ids = arguments.QueryInterface(AM_Ci.nsIVariant);
+  openWindow: function(parent, url, name, features, args) {
+    let ids = args.QueryInterface(AM_Ci.nsIVariant);
     this.sawAddon = ids.indexOf(ID) >= 0;
   },
 
   QueryInterface: function(iid) {
     if (iid.equals(AM_Ci.nsIWindowWatcher)
         || iid.equals(AM_Ci.nsISupports))
       return this;