Another round of orange fixes, sigh. r=orange yet again
authorJeff Walden <jwalden@mit.edu>
Sun, 23 Jan 2011 00:12:05 -0800
changeset 61224 b2024811aea7dcb7a7145ca6221da1172d0b96d4
parent 61223 e107ac5e475217cbb6b7eb478a836fea931c1825
child 61225 a7d178f043dbc420c38e1bdd8f62453745c94572
push idunknown
push userunknown
push dateunknown
reviewersorange
milestone2.0b10pre
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
Another round of orange fixes, sigh. r=orange yet again
browser/base/content/syncSetup.js
browser/fuel/src/fuelApplication.js
docshell/test/chrome/bug449778_window.xul
docshell/test/chrome/bug449780_window.xul
layout/base/tests/chrome/chrome_content_integration_window.xul
layout/base/tests/chrome/chrome_over_plugin_window.xul
layout/base/tests/chrome/default_background_window.xul
layout/style/test/chrome/hover_helper.html
testing/mochitest/browser-harness.xul
toolkit/content/tests/chrome/bug263683_window.xul
toolkit/content/tests/chrome/bug331215_window.xul
toolkit/content/tests/chrome/bug451286_window.xul
toolkit/content/tests/chrome/bug451540_window.xul
--- a/browser/base/content/syncSetup.js
+++ b/browser/base/content/syncSetup.js
@@ -875,19 +875,19 @@ var gSyncSetup = {
 
     return true;
   },
 
   // sets class and string on a feedback element
   // if no property string is passed in, we clear label/style
   _setFeedback: function (element, success, string) {
     element.hidden = success || !string;
-    let class = success ? "success" : "error";
+    let classname = success ? "success" : "error";
     let image = element.getElementsByAttribute("class", "statusIcon")[0];
-    image.setAttribute("status", class);
+    image.setAttribute("status", classname);
     let label = element.getElementsByAttribute("class", "status")[0];
     label.value = string;
   },
 
   // shim
   _setFeedbackMessage: function (element, success, string) {
     let str = "";
     if (string) {
--- a/browser/fuel/src/fuelApplication.js
+++ b/browser/fuel/src/fuelApplication.js
@@ -698,20 +698,20 @@ Application.prototype = {
   get bookmarks() {
     let bookmarks = new BookmarkRoots();
     this.__defineGetter__("bookmarks", function() bookmarks);
     return this.bookmarks;
   },
 
   get windows() {
     var win = [];
-    var enum = Utilities.windowMediator.getEnumerator("navigator:browser");
+    var browserEnum = Utilities.windowMediator.getEnumerator("navigator:browser");
 
-    while (enum.hasMoreElements())
-      win.push(new Window(enum.getNext()));
+    while (browserEnum.hasMoreElements())
+      win.push(new Window(browserEnum.getNext()));
 
     return win;
   },
 
   get activeWindow() {
     return new Window(Utilities.windowMediator.getMostRecentWindow("navigator:browser"));
   }
 };
--- a/docshell/test/chrome/bug449778_window.xul
+++ b/docshell/test/chrome/bug449778_window.xul
@@ -4,18 +4,18 @@
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <hbox id="parent">
   </hbox>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
     var imports = [ "SimpleTest", "is", "isnot", "ok", "onerror" ];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
 
     function $(id) {
       return document.getElementById(id);
     }
 
     function addBrowser(parent, id, width, height) {
       var b =
--- a/docshell/test/chrome/bug449780_window.xul
+++ b/docshell/test/chrome/bug449780_window.xul
@@ -4,18 +4,18 @@
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <hbox id="parent">
   </hbox>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
     var imports = [ "SimpleTest", "is", "isnot", "ok", "onerror" ];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
 
     function $(id) {
       return document.getElementById(id);
     }
 
     function addBrowser(parent, id, width, height) {
       var b =
--- a/layout/base/tests/chrome/chrome_content_integration_window.xul
+++ b/layout/base/tests/chrome/chrome_content_integration_window.xul
@@ -16,18 +16,18 @@
             src="data:text/html,&lt;div style='position:absolute;left:0;top:0;width:100%;height:100px;background:yellow;border-bottom:100px solid black'&gt;"/>
     <!-- the top 100px is a strip of black above the content iframe -->
     <vbox style="border-top:100px solid black;"/>
   </stack>
 
   <script type="application/javascript">
     <![CDATA[
     var imports = [ "SimpleTest", "is", "isnot", "ok" ];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
     
     function runTests() {
       var testCanvas = snapshotWindow(window);
 
       var refCanvas = snapshotWindow(window);
       var ctx = refCanvas.getContext('2d');
       ctx.fillStyle = "black";
--- a/layout/base/tests/chrome/chrome_over_plugin_window.xul
+++ b/layout/base/tests/chrome/chrome_over_plugin_window.xul
@@ -17,18 +17,18 @@
       <vbox style="height:25px; background:rgba(0,128,0,0.5);"/> <!-- plugin should be covered here -->
       <vbox style="height:50px;"/> <!-- plugin should be visible here -->
     </vbox>
   </stack>
 
   <script type="application/javascript">
     <![CDATA[
     var imports = [ "SimpleTest", "is", "isnot", "ok", "todo" ];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
 
     var plugin;
     function waitForPaint() {
       if (plugin.getPaintCount() < 1) {
         setTimeout(waitForPaint, 0);
         return;
       }
--- a/layout/base/tests/chrome/default_background_window.xul
+++ b/layout/base/tests/chrome/default_background_window.xul
@@ -13,18 +13,18 @@
 
   <iframe type="content" id="f" src="about:blank" style="border:1px solid black;"/>
 
   <script type="application/javascript">
   <![CDATA[
     SimpleTest.waitForExplicitFinish();
 
     var imports = [ "SimpleTest", "is", "isnot", "ok" ];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
     
     function snapshot(win) {
       var el = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
       el.width = win.innerWidth;
       el.height = win.innerHeight;
 
       var ctx = el.getContext("2d");
--- a/layout/style/test/chrome/hover_helper.html
+++ b/layout/style/test/chrome/hover_helper.html
@@ -31,18 +31,18 @@
     <div style="width: 5000px; height: 10px;"></div>
   </div>
 
 </div>
 <pre id="test">
 <script type="application/javascript">
 
 var imports = [ "SimpleTest", "is", "isnot", "ok" ];
-for each (var import in imports) {
-    window[import] = window.opener.wrappedJSObject[import];
+for each (var name in imports) {
+    window[name] = window.opener.wrappedJSObject[name];
 }
 
 var div = document.getElementById("display");
 var divtwo = document.getElementById("two");
 var iframe = document.getElementById("twoi");
 var divtwoparent = document.getElementById("twoparent");
 
 iframe.contentDocument.open();
--- a/testing/mochitest/browser-harness.xul
+++ b/testing/mochitest/browser-harness.xul
@@ -199,18 +199,18 @@
       get htmlLog() {
         let txtToHTML = Cc["@mozilla.org/txttohtmlconv;1"].
                         getService(Ci.mozITXTToHTMLConv);
         function _entityEncode(str) {
           return txtToHTML.scanTXT(str, Ci.mozITXTToHTMLConv.kEntities);
         }
         var path = _entityEncode(this.path);
         var html = this.results.map(function (t) {
-          var class = t.info ? "info" : "result " + (t.pass ? "passed" : "failed");
-          return "<p class=\"" + class + "\">" + t.result + " | " + path +
+          var classname = t.info ? "info" : "result " + (t.pass ? "passed" : "failed");
+          return "<p class=\"" + classname + "\">" + t.result + " | " + path +
                  " | " + _entityEncode(t.msg) + "</p>";
         }).join("\n");
         if (this.duration) {
           html += "<p class=\"info\">TEST-END | " + path + " | finished in " +
                   this.duration + " ms</p>";
         }
         return html;
       }
--- a/toolkit/content/tests/chrome/bug263683_window.xul
+++ b/toolkit/content/tests/chrome/bug263683_window.xul
@@ -50,18 +50,18 @@
     const Ci = Components.interfaces;
     const Cc = Components.classes;
     const Cr = Components.results;
 
     var gFindBar = null;
     var gBrowser;
 
     var imports = ["SimpleTest", "ok"];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
 
     function finish() {
       window.close();
       SimpleTest.finish();
     }
 
     function startTest() {
--- a/toolkit/content/tests/chrome/bug331215_window.xul
+++ b/toolkit/content/tests/chrome/bug331215_window.xul
@@ -50,18 +50,18 @@
     const Ci = Components.interfaces;
     const Cc = Components.classes;
     const Cr = Components.results;
 
     var gFindBar = null;
     var gBrowser;
 
     var imports = ["SimpleTest", "ok"];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
 
     function finish() {
       window.close();
       SimpleTest.finish();
     }
 
     function startTest() {
--- a/toolkit/content/tests/chrome/bug451286_window.xul
+++ b/toolkit/content/tests/chrome/bug451286_window.xul
@@ -52,18 +52,18 @@
     const Cr = Components.results;
     const SEARCH_TEXT = "text";
     const DATAURI = "data:text/html," + SEARCH_TEXT;
 
     var gFindBar = null;
     var gBrowser;
 
     var imports = ["SimpleTest", "ok", "snapshotWindow", "compareSnapshots"];
-    for each (var import in imports) {
-      window[import] = window.opener.wrappedJSObject[import];
+    for each (var name in imports) {
+      window[name] = window.opener.wrappedJSObject[name];
     }
 
     function finish() {
       window.close();
       SimpleTest.finish();
     }
 
     function startTest() {
--- a/toolkit/content/tests/chrome/bug451540_window.xul
+++ b/toolkit/content/tests/chrome/bug451540_window.xul
@@ -57,18 +57,18 @@
     var sendCtrl = true;
     var sendMeta = false;
     if (navigator.platform.indexOf("Mac") >= 0) {
       sendCtrl = false;
       sendMeta = true;
     }
 
     var imports = [ "SimpleTest", "ok"];
-      for each (var import in imports) {
-        window[import] = window.opener.wrappedJSObject[import];
+      for each (var name in imports) {
+        window[name] = window.opener.wrappedJSObject[name];
       }
 
 
     function finishTest() {
       window.close();
       SimpleTest.finish();
     }