Backed out changeset af69a7e1b59f (bug 1427006)for failing devtools and test verify tests test/mochitest/browser_webconsole_console_group.js r=backout on a CLOSED TREE
authorTiberius Oros <toros@mozilla.com>
Fri, 05 Jan 2018 17:34:39 +0200
changeset 449729 85baf8c8549c227e169462ff732c5b2b7dc48577
parent 449728 f8a1aafc3703f17d8f7d7eacbeaa5a70048426a9
child 449730 2445ab084f3d70a41ddbbfad66b2eb27a90956fa
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1427006
milestone59.0a1
backs outaf69a7e1b59f84302226cd0849f43e2348a30eb1
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
Backed out changeset af69a7e1b59f (bug 1427006)for failing devtools and test verify tests test/mochitest/browser_webconsole_console_group.js r=backout on a CLOSED TREE
devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_console_group.js
--- a/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_console_group.js
+++ b/devtools/client/webconsole/new-console-output/test/mochitest/browser_webconsole_console_group.js
@@ -26,111 +26,63 @@ add_task(async function () {
           parameters: message.parameters,
           messageText: message.messageText
         });
         return res;
       }, []);
     info("messages : " + JSON.stringify(messages));
   });
 
-  const onMessagesLogged = waitForMessage(hud, "log-6");
   ContentTask.spawn(gBrowser.selectedBrowser, null, function () {
     content.wrappedJSObject.doLog();
   });
-  await onMessagesLogged;
 
   info("Test a group at root level");
-  let node = findMessage(hud, "group-1");
+  let node = await waitFor(() => findMessage(hud, "group-1"));
   testClass(node, "startGroup");
   testIndent(node, 0);
-  testGroupToggle({
-    node,
-    store,
-    shouldBeOpen: true,
-    visibleMessageIdsAfterExpand: ["1","2","3","4","6","8","9","12"],
-    visibleMessageIdsAfterCollapse: ["1","8","9","12"],
-  });
 
   info("Test a message in a 1 level deep group");
-  node = findMessage(hud, "log-1");
+  node = await waitFor(() => findMessage(hud, "log-1"), undefined, 200);
   testClass(node, "log");
   testIndent(node, 1);
 
   info("Test a group in a 1 level deep group");
-  node = findMessage(hud, "group-2");
+  node = await waitFor(() => findMessage(hud, "group-2"));
   testClass(node, "startGroup");
   testIndent(node, 1);
-  testGroupToggle({
-    node,
-    store,
-    shouldBeOpen: true,
-    visibleMessageIdsAfterExpand: ["1","2","3","4","6","8","9","12"],
-    visibleMessageIdsAfterCollapse: ["1","2","3","6","8","9","12"],
-  });
 
   info("Test a message in a 2 level deep group");
-  node = findMessage(hud, "log-2");
+  node = await waitFor(() => findMessage(hud, "log-2"));
   testClass(node, "log");
   testIndent(node, 2);
 
   info("Test a message in a 1 level deep group, after closing a 2 level deep group");
-  node = findMessage(hud, "log-3");
+  node = await waitFor(() => findMessage(hud, "log-3"));
   testClass(node, "log");
   testIndent(node, 1);
 
   info("Test a message at root level, after closing all the groups");
-  node = findMessage(hud, "log-4");
+  node = await waitFor(() => findMessage(hud, "log-4"));
   testClass(node, "log");
   testIndent(node, 0);
 
   info("Test a collapsed group at root level");
-  node = findMessage(hud, "group-3");
+  node = await waitFor(() => findMessage(hud, "group-3"));
   testClass(node, "startGroupCollapsed");
   testIndent(node, 0);
-  testGroupToggle({
-    node,
-    store,
-    shouldBeOpen: false,
-    visibleMessageIdsAfterExpand: ["1","2","3","4","6","8","9","10","12"],
-    visibleMessageIdsAfterCollapse: ["1","2","3","4","6","8","9","12"]
-  });
-
   info("Test a message at root level, after closing a collapsed group");
-  node = findMessage(hud, "log-6");
+  node = await waitFor(() => findMessage(hud, "log-6"));
   testClass(node, "log");
   testIndent(node, 0);
   let nodes = hud.ui.outputNode.querySelectorAll(".message");
   is(nodes.length, 8, "expected number of messages are displayed");
 });
 
 function testClass(node, className) {
   ok(node.classList.contains(className), `message has the expected "${className}" class`);
 }
 
 function testIndent(node, indent) {
   indent = `${indent * INDENT_WIDTH}px`;
   is(node.querySelector(".indent").style.width, indent,
     "message has the expected level of indentation");
 }
-
-function testGroupToggle({ node, store, shouldBeOpen,
-  visibleMessageIdsAfterExpand, visibleMessageIdsAfterCollapse }) {
-  let toggleArrow = node.querySelector(".theme-twisty");
-  const isOpen = node => node.classList.contains("open");
-  const assertVisibleMessageIds = (expanded) => {
-    let visibleMessageIds = store.getState().messages.visibleMessages;
-    expanded ? is(visibleMessageIds.toString(), visibleMessageIdsAfterExpand.toString()) :
-      is(visibleMessageIds.toString(), visibleMessageIdsAfterCollapse.toString());
-  }
-
-  is(isOpen(node), shouldBeOpen);
-  assertVisibleMessageIds(shouldBeOpen);
-
-  toggleArrow.click();
-  shouldBeOpen = !shouldBeOpen;
-  is(isOpen(node), shouldBeOpen);
-  assertVisibleMessageIds(shouldBeOpen);
-
-  toggleArrow.click();
-  shouldBeOpen = !shouldBeOpen;
-  is(isOpen(node), shouldBeOpen);
-  assertVisibleMessageIds(shouldBeOpen);
-}
\ No newline at end of file