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

Unified Diff: third_party/WebKit/LayoutTests/transitions/transition-end-event-rendering.html

Issue 2619933002: CSS Transitions: Fix flaky transition-end-event-rendering.html (Closed)
Patch Set: Created 3 years, 11 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/transitions/transition-end-event-rendering.html
diff --git a/third_party/WebKit/LayoutTests/transitions/transition-end-event-rendering.html b/third_party/WebKit/LayoutTests/transitions/transition-end-event-rendering.html
index 010a0730cd12673de4e654d37d9d974f14d9f7bd..0d50deaaa9c6e97c3a402bf177ce2af0123eb180 100644
--- a/third_party/WebKit/LayoutTests/transitions/transition-end-event-rendering.html
+++ b/third_party/WebKit/LayoutTests/transitions/transition-end-event-rendering.html
@@ -21,39 +21,39 @@
margin: 10px 0;
background-color: green;
}
-
- #container.moved .software {
- left: 300px;
- }
#container.moved .hardware {
transform: translateX(300px);
}
- .software {
- -webkit-transition: left 300ms linear;
- }
-
.hardware {
- -webkit-transition: transform 1s linear;
+ -webkit-transition: transform 100ms linear;
transform: translateX(0);
}
</style>
- <script src="../animations/resources/animation-test-helpers.js"></script>
<script>
+ 'use strict';
+ function waitForCompositor() {
+ var tester = document.getElementById('tester');
+ return tester.animate({transform: ['scale(1)', 'scale(1)']}, 1).finished;
+ }
function testEnded()
{
- if (window.testRunner)
- testRunner.notifyDone();
+ waitForCompositor().then(() => {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
}
function startTest()
{
if (window.testRunner)
testRunner.waitUntilDone();
+
document.getElementById('tester').addEventListener('webkitTransitionEnd', testEnded, false);
+ document.getElementById('container').offsetTop; // Force style recalc
document.getElementById('container').className = 'moved';
}
@@ -63,7 +63,6 @@
<body>
<div id="container">
- <!-- <div class="software box"></div> -->
<div id="tester" class="hardware box"></div>
</div>
« 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