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

Unified Diff: third_party/WebKit/LayoutTests/transitions/opacity-transition-zindex.html

Issue 2591623002: CSS Transition: Fix flaky opacity-transition-zindex.html (Closed)
Patch Set: no classes Created 4 years 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
Index: third_party/WebKit/LayoutTests/transitions/opacity-transition-zindex.html
diff --git a/third_party/WebKit/LayoutTests/transitions/opacity-transition-zindex.html b/third_party/WebKit/LayoutTests/transitions/opacity-transition-zindex.html
index 7dafbdd0e31e68a1358d11c7c61b9cb0856fef00..0e0c9cad63b2fcda0c4f92f81f4df12a05003aee 100644
--- a/third_party/WebKit/LayoutTests/transitions/opacity-transition-zindex.html
+++ b/third_party/WebKit/LayoutTests/transitions/opacity-transition-zindex.html
@@ -3,22 +3,22 @@
<html>
<head>
<style>
- .container {
+ * {
+ margin: 0;
+ }
+ #container {
position: relative;
height: 300px;
width: 300px;
margin: 10px;
background-color: green;
+ opacity: 0.5;
transition-property: opacity;
transition-timing-function: linear;
transition-duration: 5s;
}
-
- #first {
- opacity: 0.5;
- }
- .box {
+ #box {
position: absolute;
left: 10px;
top: 10px;
@@ -27,7 +27,7 @@
background-color: blue;
}
- .indicator {
+ #indicator {
position: absolute;
top: 150px;
left: 150px;
@@ -41,9 +41,14 @@
if (window.testRunner)
testRunner.waitUntilDone();
+ function waitForCompositor() {
+ var box = document.getElementById('box');
+ return box.animate({transform: ['scale(1)', 'scale(1)']}, 1).ready;
+ }
+
function runTest()
{
- var container = document.getElementById('first');
+ var container = document.getElementById('container');
container.style.opacity = 1;
// dump the tree in the middle of the transition
@@ -52,7 +57,9 @@
window.internals.pauseAnimations(2.5);
}
if (window.testRunner) {
+ waitForCompositor().then(() => {
testRunner.notifyDone();
+ });
}
}
// FIXME: this should use runTransitionTest().
@@ -61,9 +68,9 @@
</head>
<body>
- <div class="container" id="first">
- <div class="box"></div>
- <div class="indicator"></div>
+ <div id="container">
+ <div id="box"></div>
+ <div id="indicator"></div>
</div>
</body>

Powered by Google App Engine
This is Rietveld 408576698