Bug 1081072 - Add reftest. a=test-only
authorDaniel Holbert <dholbert@cs.stanford.edu>
Sun, 19 Oct 2014 23:36:46 -0700
changeset 233453 5bd4fce1c9ad48d9213d5703bb1d56201175ac18
parent 233452 ed6e7b46e77abfc0f221ac1c46ce226ec96c55f4
child 233454 c7e986f4ec720012ec9d2e3f539efdbc32c7569c
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstest-only
bugs1081072
milestone35.0a2
Bug 1081072 - Add reftest. a=test-only
layout/reftests/bugs/1081072-1-ref.html
layout/reftests/bugs/1081072-1.html
layout/reftests/bugs/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1081072-1-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <style>
+    .container {
+      border: 1px solid black;
+    }
+  </style>
+</head>
+<body>
+  <div class="container">
+    <div>T</div>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1081072-1.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<head>
+  <style>
+    .container {
+      display: flex;
+      overflow-y: auto;
+      border: 1px solid black;
+    }
+  </style>
+  <script type='text/javascript'>
+    window.addEventListener("MozReftestInvalidate", startTest);
+
+    function startTest() {
+      // NOTE: setTimeout in tests is evil, but it's necessary here -- we need
+      // to wait until the scrollbars have finished fading, and there's no
+      // event we can listen for to signal that, AFAIK. Fortunately, there
+      // shouldn't be *visible* scrollbars in this testcase, so even if our
+      // setTimeout fires too early/late, the test will still pass. (So, there
+      // shouldn't be spurious failures; any failures that happen will be real.)
+      setTimeout(endTest, 800);
+    }
+
+    function endTest() {
+      document.documentElement.removeAttribute("class");
+    }
+  </script>
+</head>
+<body>
+  <div class="container">
+    <div>T</div>
+  </div>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1829,8 +1829,9 @@ pref(browser.display.use_document_fonts,
 == 1053035-1-flex.html 1053035-1-ref.html
 test-pref(layout.css.grid.enabled,true) == 1053035-1-grid.html 1053035-1-ref.html
 == 1059167-1.html 1059167-1-ref.html
 == 1059498-1.html 1059498-1-ref.html
 == 1059498-2.html 1059498-1-ref.html
 == 1059498-3.html 1059498-1-ref.html
 test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html
 == 1069716-1.html 1069716-1-ref.html
+== 1081072-1.html 1081072-1-ref.html