Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Unified Diff: third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html

Issue 2704583003: Compositing: avoid flakes in overflow-positioning.html (Closed)
Patch Set: Test if internals available Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
index d0a1874386f5de743151d78a57cf4e94fc6ef88f..1af9aa7e4a90b0489c1ec390af80372f745e3ac0 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
@@ -54,18 +54,23 @@
if (window.testRunner)
testRunner.waitUntilDone();
+ function waitForCompositor() {
+ return document.body.animate({opacity: [1, 1]}, 1).finished;
+ }
+
function startTest()
{
- window.setTimeout(function() {
- var mover = document.getElementById('mover');
- mover.className = 'moving';
-
- window.setTimeout(function() {
- if (window.testRunner)
- testRunner.notifyDone();
- }, 0);
-
- }, 0);
+ var mover = document.getElementById('mover');
+ getComputedStyle(mover).transform; // Force style recalc
+ mover.className = 'moving';
+ if (window.internals)
+ internals.pauseAnimations(0);
+
+ waitForCompositor().then(() => {
+ if (window.testRunner) {
+ testRunner.notifyDone();
+ }
+ });
}
window.addEventListener('load', startTest, false);
« no previous file with comments | « third_party/WebKit/LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698