Bug 1317400 - Part 3: Fix devtools tests. r=till
authorTooru Fujisawa <arai_a@mac.com>
Sat, 04 Mar 2017 20:37:14 +0900
changeset 394992 9c0990f1b73b188c82fd712c55a0d3c19af7ee52
parent 394991 7397faeecc701270fd8f10d12bd0cc1efb7fc48c
child 394993 8f67f1b9a60116970d7cbb689ec610710cdab9b2
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1317400
milestone54.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 1317400 - Part 3: Fix devtools tests. r=till
devtools/client/inspector/markup/test/browser_markup_events_03.js
devtools/client/webconsole/test/browser_webconsole_output_02.js
devtools/server/tests/unit/test_listsources-04.js
--- a/devtools/client/inspector/markup/test/browser_markup_events_03.js
+++ b/devtools/client/inspector/markup/test/browser_markup_events_03.js
@@ -18,17 +18,17 @@ const TEST_DATA = [ // eslint-disable-li
     expected: [
       {
         type: "click",
         filename: TEST_URL + ":66",
         attributes: [
           "Bubbling",
           "DOM2"
         ],
-        handler: "function es6Method(foo, bar) {\n" +
+        handler: "es6Method(foo, bar) {\n" +
                  "  alert(\"obj.es6Method\");\n" +
                  "}"
       }
     ]
   },
   {
     selector: "#generator",
     expected: [
--- a/devtools/client/webconsole/test/browser_webconsole_output_02.js
+++ b/devtools/client/webconsole/test/browser_webconsole_output_02.js
@@ -19,33 +19,33 @@ var inputTests = [
     inspectable: true,
     variablesViewLabel: "getElementById()",
   },
 
   // 1 - anonymous function
   {
     input: "(function() { return 42; })",
     output: "function ()",
-    printOutput: "function () { return 42; }",
+    printOutput: "function() { return 42; }",
     suppressClick: true
   },
 
   // 2 - named function
   {
     input: "window.testfn1",
     output: "function testfn1()",
     printOutput: "function testfn1() { return 42; }",
     suppressClick: true
   },
 
   // 3 - anonymous function, but gets name.
   {
     input: "testobj1.testfn2",
     output: "function testfn2()",
-    printOutput: "function () { return 42; }",
+    printOutput: "function() { return 42; }",
     suppressClick: true
   },
 
   // 4 - named function with custom display name
   {
     input: "window.testfn3",
     output: "function testfn3DisplayName()",
     printOutput: "function testfn3() { return 42; }",
--- a/devtools/server/tests/unit/test_listsources-04.js
+++ b/devtools/server/tests/unit/test_listsources-04.js
@@ -24,22 +24,22 @@ function run_test_with_server(server, cb
     const client = new DebuggerClient(server.connectPipe());
     yield client.connect();
     const [,,threadClient] = yield attachTestTabAndResume(client, "test-sources");
 
     yield threadClient.reconfigure({ useSourceMaps: true });
     addSources(debuggee);
 
     threadClient.getSources(Task.async(function* (res) {
-      do_check_true(res.sources.length === 3, "3 sources exist");
+      do_check_eq(res.sources.length, 3, "3 sources exist");
 
       yield threadClient.reconfigure({ useSourceMaps: false });
 
       threadClient.getSources(function(res) {
-        do_check_true(res.sources.length === 1, "1 source exist");
+        do_check_eq(res.sources.length, 1, "1 source exist");
         client.close().then(cb);
       });
     }));
   });
 }
 
 function addSources(debuggee) {
   let { code, map } = (new SourceNode(null, null, null, [