Bug 1561435 - Fix test failures for devtools/server/, r=standard8
authorVictor Porof <vporof@mozilla.com>
Wed, 19 Jun 2019 13:43:15 -0700
changeset 541110 80230ef725c44b076b7394ca7ca36dc817e2e26b
parent 541109 ab820f7fdd388a64a447285fb2b6b1af1fb37bd1
child 541111 041abaa4aa85f5a776e2a6d6fa3e6874d007faad
push id11533
push userarchaeopteryx@coole-files.de
push dateMon, 08 Jul 2019 18:18:03 +0000
treeherdermozilla-beta@f4452e031aed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstandard8
bugs1561435
milestone69.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 1561435 - Fix test failures for devtools/server/, r=standard8 # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35893
devtools/server/tests/unit/test_blackboxing-02.js
devtools/server/tests/unit/test_blackboxing-03.js
devtools/server/tests/unit/test_stepping-06.js
--- a/devtools/server/tests/unit/test_blackboxing-02.js
+++ b/devtools/server/tests/unit/test_blackboxing-02.js
@@ -36,49 +36,44 @@ const BLACK_BOXED_URL = "http://example.
 const SOURCE_URL = "http://example.com/source.js";
 
 function test_black_box() {
   gThreadClient.once("paused", async function(packet) {
     gThreadClient.setBreakpoint({ sourceUrl: BLACK_BOXED_URL, line: 2 }, {});
     gThreadClient.resume().then(test_black_box_breakpoint);
   });
 
-  /* eslint-disable no-multi-spaces, no-undef */
+  /* eslint-disable no-undef */
+  // prettier-ignore
   Cu.evalInSandbox(
-    "" +
-      function doStuff(k) {
-        // line 1
-        const arg = 15; // line 2 - Break here
-        k(arg); // line 3
-      }, // line 4
+    "" + function doStuff(k) { // line 1
+      const arg = 15;            // line 2 - Break here
+      k(arg);                  // line 3
+    },                         // line 4
     gDebuggee,
     "1.8",
     BLACK_BOXED_URL,
     1
   );
-
+  // prettier-ignore
   Cu.evalInSandbox(
-    "" +
-    function runTest() {
-      // line 1
-      doStuff(
-        // line 2
-        function(n) {
-          // line 3
-          debugger; // line 5
-        } // line 6
-      ); // line 7
-    } + // line 8
-      "\n debugger;", // line 9
+    "" + function runTest() { // line 1
+      doStuff(                // line 2
+        function(n) {        // line 3
+          debugger;           // line 5
+        }                     // line 6
+      );                      // line 7
+    }                         // line 8
+    + "\n debugger;",         // line 9
     gDebuggee,
     "1.8",
     SOURCE_URL,
     1
   );
-  /* eslint-enable no-multi-spaces, no-undef */
+  /* eslint-enable no-undef */
 }
 
 function test_black_box_breakpoint() {
   gThreadClient.getSources().then(async function({ error, sources }) {
     Assert.ok(!error, "Should not get an error: " + error);
     const sourceFront = gThreadClient.source(
       sources.filter(s => s.url == BLACK_BOXED_URL)[0]
     );
--- a/devtools/server/tests/unit/test_blackboxing-03.js
+++ b/devtools/server/tests/unit/test_blackboxing-03.js
@@ -36,42 +36,37 @@ function test_black_box() {
   gThreadClient.once("paused", async function(packet) {
     const source = await getSourceById(gThreadClient, packet.frame.where.actor);
     gThreadClient.setBreakpoint({ sourceUrl: source.url, line: 4 }, {});
     await gThreadClient.resume();
     test_black_box_dbg_statement();
   });
 
   /* eslint-disable no-multi-spaces, no-undef */
+  // prettier-ignore
   Cu.evalInSandbox(
-    "" +
-      function doStuff(k) {
-        // line 1
-        debugger; // line 2 - Break here
-        k(100); // line 3
-      }, // line 4
+    "" + function doStuff(k) { // line 1
+      debugger;                // line 2 - Break here
+      k(100);                  // line 3
+    },                         // line 4
     gDebuggee,
     "1.8",
     BLACK_BOXED_URL,
     1
   );
-
+  // prettier-ignore
   Cu.evalInSandbox(
-    "" +
-    function runTest() {
-      // line 1
-      doStuff(
-        // line 2
-        function(n) {
-          // line 3
-          Math.abs(n); // line 4 - Break here
-        } // line 5
-      ); // line 6
-    } + // line 7
-      "\n debugger;", // line 8
+    "" + function runTest() { // line 1
+      doStuff(                // line 2
+        function(n) {        // line 3
+          Math.abs(n);        // line 4 - Break here
+        }                     // line 5
+      );                      // line 6
+    }                         // line 7
+    + "\n debugger;",         // line 8
     gDebuggee,
     "1.8",
     SOURCE_URL,
     1
   );
   /* eslint-enable no-multi-spaces, no-undef */
 }
 
--- a/devtools/server/tests/unit/test_stepping-06.js
+++ b/devtools/server/tests/unit/test_stepping-06.js
@@ -113,17 +113,17 @@ async function testThrow(dbg) {
 
   info(`4. Test leaving from doThrow via stepping out`);
   await invokeAndPause(dbg, `doThrow()`);
   await steps(threadClient, [stepOver, stepIn]);
 
   packet = await stepOut(threadClient);
   deepEqual(
     getPauseLocation(packet),
-    { line: 24, column: 0 },
+    { line: 23, column: 0 },
     `stepOut location in doThrow`
   );
 
   deepEqual(
     getFrameFinished(packet),
     { return: { type: "undefined" } },
     `completion type`
   );