Bug 1499655 - Ensure we forceLayerTreeToComposite in tests where we read the compositor APZ test data at the start of the test. r=botond, a=test-only
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 13 Dec 2018 12:23:58 +0000
changeset 509037 e6014768f6cd449b54372774b68b09fe18af9372
parent 509036 e4724d2e607659d3bbc77afd6aa1516628d347d9
child 509038 4c0ab314be9af3ed0e57b59ca1bf3c76442796ee
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond, test-only
bugs1499655
milestone65.0
Bug 1499655 - Ensure we forceLayerTreeToComposite in tests where we read the compositor APZ test data at the start of the test. r=botond, a=test-only Differential Revision: https://phabricator.services.mozilla.com/D14206
gfx/layers/apz/test/mochitest/helper_bug982141.html
gfx/layers/apz/test/mochitest/helper_key_scroll.html
--- a/gfx/layers/apz/test/mochitest/helper_bug982141.html
+++ b/gfx/layers/apz/test/mochitest/helper_bug982141.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
   <script type="application/javascript">
 
     // -------------------------------------------------------------------
     // Infrastructure to get the test assertions to run at the right time.
     // -------------------------------------------------------------------
     var SimpleTest = window.opener.SimpleTest;
 
-    waitUntilApzStable().then(testBug982141);
+    waitUntilApzStable().then(forceLayerTreeToCompositor).then(testBug982141);
 
     // --------------------------------------------------------------------
     // The actual logic for testing bug 982141.
     //
     // In this test we have a simple page with a scrollable <div> which has
     // enough content to make it scrollable. We test that this <div> got
     // a displayport.
     // --------------------------------------------------------------------
--- a/gfx/layers/apz/test/mochitest/helper_key_scroll.html
+++ b/gfx/layers/apz/test/mochitest/helper_key_scroll.html
@@ -102,17 +102,17 @@ https://bugzilla.mozilla.org/show_bug.cg
       if (rcd) {
         return rcd.hasAsyncKeyScrolled === "1";
       } else {
         SimpleTest.info("Last paint rcd is null");
         return false;
       }
     }
 
-    waitUntilApzStable().then(runTests);
+    waitUntilApzStable().then(forceLayerTreeToCompositor).then(runTests);
   </script>
 </head>
 <body style="height: 500px; overflow: scroll">
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1383365">Async key scrolling test</a>
   <!-- Put enough content into the page to make it have a nonzero scroll range -->
   <div style="height: 5000px"></div>
 </body>
 </html>