Bug 1435282 - Make SetTestSampleTime force a sync flush. r?sotaro draft
authorKartikaya Gupta <kgupta@mozilla.com>
Fri, 02 Feb 2018 10:48:25 -0500
changeset 750556 8c250bf11211ca212584e0286a492500ed7dfb09
parent 750555 8d26ff0fe47c3f1bb36632e56092dcc8583fead1
push id97707
push userkgupta@mozilla.com
push dateFri, 02 Feb 2018 17:00:40 +0000
reviewerssotaro
bugs1435282
milestone60.0a1
Bug 1435282 - Make SetTestSampleTime force a sync flush. r?sotaro SetTestSampleTime is called from tests via the advanceTimeAndRefresh API on DOMWindowUtils, and the expectation is that after it is done, the time has been advanced and a composite has happened. So we need to ensure that is the case with WebRender as well. This fixes the issue I was seeing with test_group_hittest.html and makes it pass. MozReview-Commit-ID: 86l9mTTwD2v
gfx/layers/apz/test/mochitest/mochitest.ini
gfx/layers/ipc/CompositorBridgeParent.cpp
--- a/gfx/layers/apz/test/mochitest/mochitest.ini
+++ b/gfx/layers/apz/test/mochitest/mochitest.ini
@@ -77,9 +77,9 @@
   skip-if = (toolkit == 'android') || (toolkit == 'cocoa') # wheel events not supported on mobile, and synthesized wheel smooth-scrolling not supported on OS X
 [test_wheel_scroll.html]
   skip-if = (os == 'android') # wheel events not supported on mobile
 [test_wheel_transactions.html]
   skip-if = (toolkit == 'android') || webrender # wheel events not supported on mobile; bug 1429521 for webrender
 [test_group_overrides.html]
   skip-if = (toolkit == 'android') || webrender # wheel events not supported on mobile; bug 1429521 for webrender
 [test_group_hittest.html]
-  skip-if = (toolkit == 'android') || webrender # mouse events not supported on mobile; bug 1429521 for webrender
+  skip-if = (toolkit == 'android') # mouse events not supported on mobile
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1282,17 +1282,17 @@ CompositorBridgeParent::SetTestSampleTim
 
   if (aTime.IsNull()) {
     return false;
   }
 
   mTestTime = Some(aTime);
 
   if (mWrBridge) {
-    mWrBridge->FlushRenderingAsync();
+    mWrBridge->FlushRendering();
     return true;
   }
 
   bool testComposite = mCompositionManager &&
                        mCompositorScheduler->NeedsComposite();
 
   // Update but only if we were already scheduled to animate
   if (testComposite) {