Bug 1256786 - [ESLint] Fix ESLint issues in devtools/client/webconsole/test/browser_console_error_source_click.js. r=linclark, a=test-only
authorMichael Kohler <mkohler@picobudget.com>
Tue, 03 May 2016 16:03:00 -0400
changeset 379376 250fe675e32f353b92ef36e19e3b5286bbc868db
parent 379375 17a229d8b88843924588d2ebaab854eb4ed73de1
child 379377 9e979bdaa8f5382d8de8143691a51e851bc880df
push id21011
push usermak77@bonardo.net
push dateThu, 16 Jun 2016 13:40:45 +0000
reviewerslinclark, test-only
bugs1256786
milestone48.0a2
Bug 1256786 - [ESLint] Fix ESLint issues in devtools/client/webconsole/test/browser_console_error_source_click.js. r=linclark, a=test-only
devtools/client/webconsole/test/browser_console_error_source_click.js
--- a/devtools/client/webconsole/test/browser_console_error_source_click.js
+++ b/devtools/client/webconsole/test/browser_console_error_source_click.js
@@ -24,17 +24,17 @@ function test() {
 
     // On e10s, the exception is triggered in child process
     // and is ignored by test harness
     if (!Services.appinfo.browserTabsRemoteAutostart) {
       expectUncaughtException();
     }
 
     info("generate exception and wait for the message");
-    ContentTask.spawn(gBrowser.selectedBrowser, {}, function*() {
+    ContentTask.spawn(gBrowser.selectedBrowser, {}, function* () {
       let button = content.document.querySelector("button");
       button.click();
     });
 
     waitForMessages({
       webconsole: hud,
       messages: [
         {
@@ -49,24 +49,27 @@ function test() {
         },
       ],
     }).then(onMessageFound);
   }
 
   function onMessageFound(results) {
     let viewSource = hud.viewSource;
     let viewSourceCalled = false;
-    hud.viewSourceInDebugger = () => viewSourceCalled = true;
+    hud.viewSourceInDebugger = () => {
+      viewSourceCalled = true;
+    };
 
     for (let result of results) {
       viewSourceCalled = false;
 
       let msg = [...results[0].matched][0];
       ok(msg, "message element found for: " + result.text);
-      let locationNode = msg.querySelector(".message > .message-location .frame-link-filename");
+      let selector = ".message > .message-location .frame-link-filename";
+      let locationNode = msg.querySelector(selector);
       ok(locationNode, "message location element found");
 
       EventUtils.synthesizeMouse(locationNode, 2, 2, {}, hud.iframeWindow);
 
       ok(viewSourceCalled, "view source opened");
     }
 
     hud.viewSourceInDebugger = viewSource;