blob: d8637059ef70fe7a22eb0cd20956e7abdd87718e [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
<html>
<head>
<style>
.container {
position: relative;
height: 300px;
width: 300px;
margin: 10px;
background-color: green;
-webkit-transition-property: opacity;
-webkit-transition-timing-function: linear;
-webkit-transition-duration: 5s;
}
#first {
opacity: 0.5;
}
.box {
position: absolute;
left: 10px;
top: 10px;
height: 200px;
width: 200px;
background-color: blue;
}
.indicator {
position: absolute;
top: 150px;
left: 150px;
height: 100px;
width: 100px;
background-color: orange;
z-index: -1;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
function runTest()
{
var container = document.getElementById('first');
container.style.opacity = 1;
// dump the tree in the middle of the transition
if (window.testRunner)
window.setTimeout(function() {
var firstElement = document.getElementById('first');
const transition = firstElement.getAnimations()[0];
transition.currentTime = 2500;
transition.pause();
testRunner.notifyDone();
}, 0);
}
// FIXME: this should use runTransitionTest().
window.addEventListener('load', runTest, false);
</script>
</head>
<body>
<div class="container" id="first">
<div class="box"></div>
<div class="indicator"></div>
</div>
</body>
</html>