Bug 1408946 - enable browser_webconsole_output_order.js;r=nchevobbe
authorJulian Descottes <jdescottes@mozilla.com>
Thu, 23 Nov 2017 16:41:19 +0100
changeset 393914 dd5a8a6bb54e343027bf61b2375f856d20f464e8
parent 393913 cff54d05bcad74654249e2a2d4735b491bc452fd
child 393915 7ef48daab640e292d0bb3b98eed36175335778a2
push id56111
push userjdescottes@mozilla.com
push dateTue, 28 Nov 2017 09:37:28 +0000
treeherderautoland@dd5a8a6bb54e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnchevobbe
bugs1408946
milestone59.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 1408946 - enable browser_webconsole_output_order.js;r=nchevobbe MozReview-Commit-ID: 1yzQhoGqZTi
devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_output_order.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser.ini
@@ -370,17 +370,16 @@ skip-if = true # Bug 1408945
 subsuite = clipboard
 skip-if = true #	Bug 1404364
 # old console skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_webconsole_output_copy_newlines.js]
 subsuite = clipboard
 skip-if = true #	Bug 1405641
 # old console skip-if = (os == 'linux' && bits == 32 && debug) # bug 1328915, disable linux32 debug devtools for timeouts
 [browser_webconsole_output_order.js]
-skip-if = true # Bug 1408946
 [browser_webconsole_persist.js]
 [browser_webconsole_property_provider.js]
 skip-if = true # Bug 1406841
 #old console skip-if = e10s # Bug 1042253 - webconsole tests disabled with e10s
 [browser_webconsole_prune_scroll.js]
 skip-if = true #	Bug 1404832
 [browser_webconsole_reflow.js]
 skip-if = true #	Bug 1406022
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_output_order.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_output_order.js
@@ -4,44 +4,30 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 // Tests that any output created from calls to the console API comes before the
 // echoed JavaScript.
 
 "use strict";
 
 const TEST_URI = "http://example.com/browser/devtools/client/webconsole/" +
-                 "test/test-console.html";
-
-add_task(function* () {
-  yield loadTab(TEST_URI);
-  let hud = yield openConsole();
-
-  let jsterm = hud.jsterm;
-
-  jsterm.clearOutput();
-  jsterm.execute("console.log('foo', 'bar');");
+                 "new-console-output/test/mochitest/test-console.html";
 
-  let [functionCall, consoleMessage, result] = yield waitForMessages({
-    webconsole: hud,
-    messages: [{
-      text: "console.log('foo', 'bar');",
-      category: CATEGORY_INPUT,
-    },
-      {
-        text: "foo bar",
-        category: CATEGORY_WEBDEV,
-        severity: SEVERITY_LOG,
-      },
-      {
-        text: "undefined",
-        category: CATEGORY_OUTPUT,
-      }]
+add_task(async function () {
+  let hud = await openNewTabAndConsole(TEST_URI);
+  hud.jsterm.clearOutput();
+
+  let messages = ["console.log('foo', 'bar');", "foo bar", "undefined"];
+  let onMessages = waitForMessages({
+    hud,
+    messages: messages.map(text => ({text}))
   });
 
-  let fncallNode = [...functionCall.matched][0];
-  let consoleMessageNode = [...consoleMessage.matched][0];
-  let resultNode = [...result.matched][0];
+  hud.jsterm.execute("console.log('foo', 'bar');");
+
+  const [fncallNode, consoleMessageNode, resultNode] =
+    (await onMessages).map(msg => msg.node);
+
   is(fncallNode.nextElementSibling, consoleMessageNode,
      "console.log() is followed by 'foo' 'bar'");
   is(consoleMessageNode.nextElementSibling, resultNode,
      "'foo' 'bar' is followed by undefined");
 });