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 169310 9c59eb7fb40c6ffc5feddc3e0b4eeaef6fe20f1b
parent 169309 cc07e69e7887852b5a066d1f2e747cd273da3a29
child 169311 d77cab4ae8a6dfe2ee71839c4f9bc80b4bf0fade
push id4971
push userryanvm@gmail.com
push dateThu, 16 Jan 2014 21:31:22 +0000
treeherdermozilla-aurora@af30f8d0d27f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs919072
milestone28.0a2
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);