Bug 1210117 - Flush paints before running the test body in test_scroll_inactive_flattened_frame.html. r=kats
authorBotond Ballo <botond@mozilla.com>
Mon, 07 Mar 2016 20:40:37 -0500
changeset 287261 48c1800e5b2c321c312894858328efe8df11a49e
parent 287260 acdcbd858ac363bd6feca72022d4cc8c370a604f
child 287262 92651b6c802e3975c600ab0e9256d139751b8409
push id30065
push userkwierso@gmail.com
push dateWed, 09 Mar 2016 00:01:05 +0000
treeherdermozilla-central@886b5480b578 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1210117
milestone47.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 1210117 - Flush paints before running the test body in test_scroll_inactive_flattened_frame.html. r=kats MozReview-Commit-ID: DQKdb20o4XM
gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html
--- a/gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html
+++ b/gfx/layers/apz/test/mochitest/test_scroll_inactive_flattened_frame.html
@@ -1,15 +1,16 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Test scrolling flattened inactive frames</title>
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
   <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
+  <script type="application/javascript" src="apz_test_utils.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <div id="container" style="height: 300px; width: 600px; overflow: auto; background: yellow">
  <div id="outer" style="height: 400px; width: 500px; overflow: auto; background: black">
   <div id="inner" style="mix-blend-mode: screen; height: 800px; overflow: auto; background: purple">
   </div>
  </div>
@@ -30,22 +31,28 @@ function test() {
   };
   sendWheelAndPaint(inner, 20, 30, event, function () {
     ok(container.scrollTop == containerScrollTop, "container scrollframe should not have scrolled");
     ok(outer.scrollTop > outerScrollTop, "nested scrollframe should have scrolled");
     SimpleTest.finish();
   });
 }
 
+function startTest() {
+  waitForAllPaints(function() {
+    flushApzRepaints(test);
+  });
+}
+
 window.onload = function() {
   SpecialPowers.pushPrefEnv({
     'set': [['general.smoothScroll', false],
             ['mousewheel.transaction.timeout', 1000000]],
   }, function () {
-    SimpleTest.waitForFocus(test);
+    SimpleTest.waitForFocus(startTest);
   });
 }
 
 SimpleTest.testInChaosMode();
 SimpleTest.waitForExplicitFinish();
 </script>
 </body>
 </html>