Bug 919072 - Fix for intermittent TEST-UNEXPECTED-FAIL | browser_webconsole_bug_601352_scroll.js | scroll location is not at the top - Didn't expect 0, but got it. a=test-only
authorMihai Sucan <mihai.sucan@gmail.com>
Thu, 16 Jan 2014 13:02:25 +0200
changeset 167934 8e90d365bd124de423b00baf77321ab56b190064
parent 167933 62074ff7e99354d0bfafc493956eb1e3f17be9a8
child 167935 558c0e6beadabbf3a04cbb7e2ac732e22e0aae23
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs919072
milestone27.0
Bug 919072 - Fix for intermittent TEST-UNEXPECTED-FAIL | browser_webconsole_bug_601352_scroll.js | scroll location is not at the top - Didn't expect 0, but got it. a=test-only
browser/devtools/webconsole/test/browser_webconsole_bug_601352_scroll.js
--- a/browser/devtools/webconsole/test/browser_webconsole_bug_601352_scroll.js
+++ b/browser/devtools/webconsole/test/browser_webconsole_bug_601352_scroll.js
@@ -25,21 +25,21 @@ function consoleOpened(HUD) {
   for (let i = 0; i < 50; i++) {
     content.console.log("test message " + i);
   }
 
   HUD.jsterm.execute("1+1", performTest);
 
   function performTest(node) {
     let scrollNode = HUD.outputNode.parentNode;
-    isnot(scrollNode.scrollTop, 0, "scroll location is not at the top");
-
     let rectNode = node.getBoundingClientRect();
     let rectOutput = scrollNode.getBoundingClientRect();
 
+    isnot(scrollNode.scrollTop, 0, "scroll location is not at the top");
+
     // Visible scroll viewport.
     let height = scrollNode.scrollHeight - scrollNode.scrollTop;
 
     // Top position of the last message node, relative to the outputNode.
     let top = rectNode.top + scrollNode.scrollTop;
     let bottom = top + node.clientHeight;
     info("output height " + height + " node top " + top + " node bottom " + bottom + " node height " + node.clientHeight);