Bug 1330064 - Manually fix brace-style allowSingleLine:false rules that --fix couldn't do automatically. r?mossop draft
authorJared Wein <jwein@mozilla.com>
Tue, 10 Jan 2017 15:12:41 -0500
changeset 458623 d68fa4840b85ac6739c98383a3e0454c2a4d2a02
parent 458622 a49039c73ac7f155e69a91c6550c9da773f5c601
child 541700 1003ee89860d9c4471b0f69446f0eea3d074f285
push id41010
push userbmo:jaws@mozilla.com
push dateTue, 10 Jan 2017 20:18:08 +0000
reviewersmossop
bugs1330064
milestone53.0a1
Bug 1330064 - Manually fix brace-style allowSingleLine:false rules that --fix couldn't do automatically. r?mossop MozReview-Commit-ID: FVOHxNoWJWg
browser/base/content/tabbrowser.xml
browser/base/content/test/general/file_install_extensions.html
browser/base/content/test/general/gZipOfflineChild_uncompressed.html
browser/base/content/test/general/offlineChild.html
browser/base/content/test/general/offlineChild2.html
toolkit/components/alerts/test/test_alerts_requireinteraction.html
toolkit/components/prompts/content/tabprompts.xml
toolkit/components/satchel/test/test_bug_511615.html
toolkit/components/satchel/test/test_bug_787624.html
toolkit/components/satchel/test/test_popup_direction.html
toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
toolkit/content/tests/mochitest/test_mousecapture.xhtml
toolkit/content/widgets/colorpicker.xml
toolkit/content/widgets/richlistbox.xml
toolkit/content/widgets/videocontrols.xml
toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -5123,18 +5123,22 @@
             childNodes: [null, this.tabContextMenu, this.tabContainer],
             firstChild: { nextSibling: this.tabContextMenu },
             getElementsByAttribute(attr, attrValue) {
               if (attr == "anonid" && attrValue == "tabContextMenu")
                 return [this.self.tabContextMenu];
               return [];
             },
             // Also support adding event listeners (forward to the tab container)
-            addEventListener(a, b, c) { this.self.tabContainer.addEventListener(a, b, c); },
-            removeEventListener(a, b, c) { this.self.tabContainer.removeEventListener(a, b, c); }
+            addEventListener(a, b, c) {
+              this.self.tabContainer.addEventListener(a, b, c);
+            },
+            removeEventListener(a, b, c) {
+              this.self.tabContainer.removeEventListener(a, b, c);
+            }
           });
         ]]>
         </getter>
       </property>
       <field name="_soundPlayingAttrRemovalTimer">0</field>
     </implementation>
 
     <handlers>
--- a/browser/base/content/test/general/file_install_extensions.html
+++ b/browser/base/content/test/general/file_install_extensions.html
@@ -11,16 +11,18 @@ function installMozAM(url) {
     const EVENTS = [
       "onDownloadCancelled",
       "onDownloadFailed",
       "onInstallCancelled",
       "onInstallEnded",
       "onInstallFailed",
     ];
     for (let event of EVENTS) {
-      install.addEventListener(event, () => { resolve(event); });
+      install.addEventListener(event, () => {
+        resolve(event);
+      });
     }
     install.install();
   }));
 }
 </script>
 </body>
 </html>
--- a/browser/base/content/test/general/gZipOfflineChild_uncompressed.html
+++ b/browser/base/content/test/general/gZipOfflineChild_uncompressed.html
@@ -3,19 +3,25 @@
   <!-- This file is gzipped to create gZipOfflineChild.html -->
 <title></title>
 <script type="text/javascript">
 
 function finish(success) {
   window.parent.postMessage(success, "*");
 }
 
-applicationCache.oncached = function() { finish("oncache"); }
-applicationCache.onnoupdate = function() { finish("onupdate"); }
-applicationCache.onerror = function() { finish("onerror"); }
+applicationCache.oncached = function() {
+  finish("oncache");
+}
+applicationCache.onnoupdate = function() {
+  finish("onupdate");
+}
+applicationCache.onerror = function() {
+  finish("onerror");
+}
 
 </script>
 </head>
 
 <body>
 <h1>Child</h1>
 </body>
 </html>
--- a/browser/base/content/test/general/offlineChild.html
+++ b/browser/base/content/test/general/offlineChild.html
@@ -2,19 +2,25 @@
 <head>
 <title></title>
 <script type="text/javascript">
 
 function finish(success) {
   window.parent.postMessage(success ? "success" : "failure", "*");
 }
 
-applicationCache.oncached = function() { finish(true); }
-applicationCache.onnoupdate = function() { finish(true); }
-applicationCache.onerror = function() { finish(false); }
+applicationCache.oncached = function() {
+  finish(true);
+}
+applicationCache.onnoupdate = function() {
+  finish(true);
+}
+applicationCache.onerror = function() {
+  finish(false);
+}
 
 </script>
 </head>
 
 <body>
 <h1>Child</h1>
 </body>
 </html>
--- a/browser/base/content/test/general/offlineChild2.html
+++ b/browser/base/content/test/general/offlineChild2.html
@@ -2,19 +2,25 @@
 <head>
 <title></title>
 <script type="text/javascript">
 
 function finish(success) {
   window.parent.postMessage(success ? "success" : "failure", "*");
 }
 
-applicationCache.oncached = function() { finish(true); }
-applicationCache.onnoupdate = function() { finish(true); }
-applicationCache.onerror = function() { finish(false); }
+applicationCache.oncached = function() {
+  finish(true);
+}
+applicationCache.onnoupdate = function() {
+  finish(true);
+}
+applicationCache.onerror = function() {
+  finish(false);
+}
 
 </script>
 </head>
 
 <body>
 <h1>Child</h1>
 </body>
 </html>
--- a/toolkit/components/alerts/test/test_alerts_requireinteraction.html
+++ b/toolkit/components/alerts/test/test_alerts_requireinteraction.html
@@ -127,17 +127,19 @@ add_task(function* test_require_interact
   ok(xulAlertCreated, "Create XUL alert");
 
   // Replace second alert
   xulAlertCreated = yield promiseCreateXULAlert(alertService,
     createAlertListener("second replacement"), "second");
   ok(xulAlertCreated, "Create XUL alert");
 
   var testFinishResolve;
-  var testFinishPromise = new Promise((resolve) => { testFinishResolve = resolve; });
+  var testFinishPromise = new Promise((resolve) => {
+    testFinishResolve = resolve;
+  });
 
   xulAlertCreated = yield promiseCreateXULAlert(alertService,
     createAlertListener("third"), "third"),
   ok(!xulAlertCreated, "XUL alert should not be visible");
 
   // Replace the not-yet-visible third alert.
   xulAlertCreated = yield promiseCreateXULAlert(alertService,
     createAlertListener("third replacement",
--- a/toolkit/components/prompts/content/tabprompts.xml
+++ b/toolkit/components/prompts/content/tabprompts.xml
@@ -109,17 +109,19 @@
                 // focusTarget (for BUTTON_DELAY_ENABLE) not yet supported
             };
 
             this.ui.button0.addEventListener("command", this.onButtonClick.bind(this, 0), false);
             this.ui.button1.addEventListener("command", this.onButtonClick.bind(this, 1), false);
             this.ui.button2.addEventListener("command", this.onButtonClick.bind(this, 2), false);
             this.ui.button3.addEventListener("command", this.onButtonClick.bind(this, 3), false);
             // Anonymous wrapper used here because |Dialog| doesn't exist until init() is called!
-            this.ui.checkbox.addEventListener("command", function() { self.Dialog.onCheckbox(); }, false);
+            this.ui.checkbox.addEventListener("command", function() {
+                self.Dialog.onCheckbox();
+            }, false);
             this.isLive = false;
         ]]>
         </constructor>
         <destructor>
         <![CDATA[
             if (this.isLive) {
                 this.abortPrompt();
             }
--- a/toolkit/components/satchel/test/test_bug_511615.html
+++ b/toolkit/components/satchel/test/test_bug_511615.html
@@ -24,17 +24,19 @@ Test for Form History Autocomplete Untru
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /* import-globals-from satchel_common.js */
 
 var resolvePopupShownListener;
 registerPopupShownListener(() => resolvePopupShownListener());
 
 function waitForNextPopup() {
-  return new Promise(resolve => { resolvePopupShownListener = resolve; });
+  return new Promise(resolve => {
+    resolvePopupShownListener = resolve;
+  });
 }
 
 /**
  * Indicates the time to wait before checking that the state of the autocomplete
  * popup, including whether it is open, has not changed in response to events.
  *
  * Manual testing on a fast machine revealed that 80ms was still unreliable,
  * while 100ms detected a simulated failure reliably. Unfortunately, this means
--- a/toolkit/components/satchel/test/test_bug_787624.html
+++ b/toolkit/components/satchel/test/test_bug_787624.html
@@ -53,17 +53,19 @@ Form History Layout test: form field aut
 /* import-globals-from satchel_common.js */
 
 /** Test for Form History autocomplete Layout: Bug 787624 **/
 
 var resolvePopupShownListener;
 registerPopupShownListener(() => resolvePopupShownListener());
 
 function waitForNextPopup() {
-  return new Promise(resolve => { resolvePopupShownListener = resolve; });
+  return new Promise(resolve => {
+    resolvePopupShownListener = resolve;
+  });
 }
 
 add_task(function* test_popup_not_move_input() {
   var input = $_(1, "field1");
   var rect = input.getBoundingClientRect();
 
   yield new Promise(resolve => updateFormHistory([
     { op : "remove" },
--- a/toolkit/components/satchel/test/test_popup_direction.html
+++ b/toolkit/components/satchel/test/test_popup_direction.html
@@ -23,17 +23,19 @@ Test for Popup Direction
 <pre id="test">
 <script class="testbody" type="text/javascript">
 /* import-globals-from satchel_common.js */
 
 var resolvePopupShownListener;
 registerPopupShownListener(() => resolvePopupShownListener());
 
 function waitForNextPopup() {
-  return new Promise(resolve => { resolvePopupShownListener = resolve; });
+  return new Promise(resolve => {
+    resolvePopupShownListener = resolve;
+  });
 }
 
 add_task(function* test_popup_direction() {
   var input = $_(1, "field1");
 
   yield new Promise(resolve => updateFormHistory([
     { op : "remove" },
     { op : "add", fieldname : "field1", value : "value1" },
--- a/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
+++ b/toolkit/content/tests/chrome/test_autocomplete_with_composition_on_input.html
@@ -35,23 +35,27 @@ function runTests() {
   target.focus();
   target.value = "Mozilla";
   synthesizeKey("VK_RETURN", {});
   target.value = "";
 
   new nsDoTestsForAutoCompleteWithComposition(
     "Testing on HTML input (asynchronously search)",
     window, target, formFillController.controller, is,
-    function() { return target.value; },
+    function() {
+      return target.value;
+    },
     function() {
       target.setAttribute("timeout", 0);
       new nsDoTestsForAutoCompleteWithComposition(
         "Testing on HTML input (synchronously search)",
         window, target, formFillController.controller, is,
-        function() { return target.value; },
+        function() {
+          return target.value;
+        },
         function() {
           formFillController.timeout = originalFormFillTimeout;
           SpecialPowers.detachFormFillControllerFrom(window);
           SimpleTest.finish();
         });
     });
 }
 
--- a/toolkit/content/tests/mochitest/test_mousecapture.xhtml
+++ b/toolkit/content/tests/mochitest/test_mousecapture.xhtml
@@ -167,17 +167,19 @@ function runTests() {
 
   // restore scroll
   if (parent) parent.scroll(scrollX, scrollY);
 
 //  frames[0].getSelection().collapseToStart();
 
   var body = frames[0].document.body;
   var fixed = frames[0].document.getElementById("fixed");
-  function captureOnBody() { body.setCapture() }
+  function captureOnBody() {
+    body.setCapture()
+  }
   body.addEventListener("mousedown", captureOnBody, true);
   synthesizeMouse(body, 8, 8, { type: "mousedown" }, frames[0]);
   body.removeEventListener("mousedown", captureOnBody, true);
   synthesizeMouseExpectEvent(fixed, 2, 2, { type: "mousemove" },
                              fixed, "mousemove", "setCapture on body retargets to root node", frames[0]);
   synthesizeMouse(body, 8, 8, { type: "mouseup" }, frames[0]);
 
   previousWidth = frames[1].frames[0].document.documentElement.clientWidth;
--- a/toolkit/content/widgets/colorpicker.xml
+++ b/toolkit/content/widgets/colorpicker.xml
@@ -527,17 +527,19 @@
           document.removeEventListener("keydown", this.mPicker, true);
           this.mPicker.mIsPopup = false;
         ]]></body>
       </method>
 
       <method name="pickerChange">
         <body><![CDATA[
           this.color = this.mPicker.color;
-          setTimeout(function(aPopup) { aPopup.hidePopup() }, 1, this.mPicker.parentNode);
+          setTimeout(function(aPopup) {
+            aPopup.hidePopup()
+          }, 1, this.mPicker.parentNode);
 
           this._fireEvent(this, "change");
         ]]></body>
       </method>
 
       <constructor><![CDATA[
         this.initialize();
       ]]></constructor>
--- a/toolkit/content/widgets/richlistbox.xml
+++ b/toolkit/content/widgets/richlistbox.xml
@@ -55,17 +55,19 @@
             // make sure not to modify last-selected when suppressing select events
             // (otherwise we'll lose the selection when a template gets rebuilt)
             if (this._suppressOnSelect || this.suppressOnSelect)
               return;
 
             // remember the current item and all selected items with IDs
             var state = this.currentItem ? this.currentItem.id : "";
             if (this.selType == "multiple" && this.selectedCount) {
-              let getId = function getId(aItem) { return aItem.id; }
+              let getId = function getId(aItem) {
+                return aItem.id;
+              }
               state += " " + [...this.selectedItems].filter(getId).map(getId).join(" ");
             }
             if (state)
               this.setAttribute("last-selected", state);
             else
               this.removeAttribute("last-selected");
 
             // preserve the index just in case no IDs are available
--- a/toolkit/content/widgets/videocontrols.xml
+++ b/toolkit/content/widgets/videocontrols.xml
@@ -224,17 +224,19 @@
                      "mozinterruptbegin", "mozinterruptend" ],
 
       firstFrameShown : false,
       timeUpdateCount : 0,
       maxCurrentTimeSeen : 0,
       isPausedByDragging: false,
       _isAudioOnly : false,
 
-      get isAudioOnly() { return this._isAudioOnly; },
+      get isAudioOnly() {
+        return this._isAudioOnly;
+      },
       set isAudioOnly(val) {
         this._isAudioOnly = val;
         this.setFullscreenButtonState();
 
         if (!this.isTopLevelSyntheticDocument) {
           return;
         }
         if (this._isAudioOnly) {
@@ -1863,17 +1865,19 @@
       },
 
       get visible() {
         return !this.Utils.controlBar.hasAttribute("fadeout") &&
                !(this.Utils.controlBar.getAttribute("hidden") == "true");
       },
 
       _firstShow: false,
-      get firstShow() { return this._firstShow; },
+      get firstShow() {
+        return this._firstShow;
+      },
       set firstShow(val) {
         this._firstShow = val;
         this.Utils.controlBar.setAttribute("firstshow", val);
       },
 
       toggleControls() {
         if (!this.Utils.dynamicControls || !this.visible) {
           this.showControls();
@@ -1980,17 +1984,19 @@
           }
         }, false);
         this.Utils.scrubber.addEventListener("touchstart", function() {
           self.clearTimer();
         }, false);
         this.Utils.scrubber.addEventListener("touchend", function() {
           self.delayHideControls(self.controlsTimeout);
         }, false);
-        this.Utils.muteButton.addEventListener("click", function() { self.delayHideControls(self.controlsTimeout); }, false);
+        this.Utils.muteButton.addEventListener("click", function() {
+          self.delayHideControls(self.controlsTimeout);
+        }, false);
 
         this.castingButton = document.getAnonymousElementByAttribute(binding, "anonid", "castingButton");
         this.castingButton.addEventListener("command", function() {
           self.startCasting();
         }, false);
 
         this.video.addEventListener("media-videoCasting", function(e) {
           if (!e.isTrusted) {
--- a/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
+++ b/toolkit/mozapps/extensions/test/xpinstall/triggerredirect.html
@@ -18,17 +18,19 @@ function installCallback(url, status) {
   window.dispatchEvent(event);
 }
 
 function startInstall() {
   InstallTrigger.install({
     "Unsigned XPI": {
       URL: "amosigned.xpi",
       IconURL: "icon.png",
-      toString() { return this.URL; }
+      toString() {
+        return this.URL;
+      }
     }
   }, installCallback);
 }
 </script>
 </head>
 <body onload="startInstall()">
 <p>InstallTrigger tests</p>
 <p id="return"></p>