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

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

Issue 2704583003: Compositing: avoid flakes in overflow-positioning.html (Closed)
Patch Set: 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..4e8894fad49dbea3ac53cd968064746d64f9ce91 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/overflow-positioning.html
@@ -40,7 +40,7 @@
height: 150px;
width: 150px;
background-color: green;
- transition: transform 1000s;
+ transition: transform 1s;
}
#mover:hover {
@@ -54,18 +54,22 @@
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';
+ internals.pauseAnimations(0);
wkorman 2017/02/17 23:12:38 This is usually behind an if (window.internals), s
Eric Willigers 2017/02/20 02:28:51 Done.
+
+ 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