Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / interrupt-zero-duration.html
blobebe4836503e28f086756801e62a61b1cd882848f
1 <!DOCTYPE html>
2 <style>
3 #box {
4 position: relative;
5 height: 100px;
6 width: 100px;
7 left: 0px;
8 background-color: blue;
9 -webkit-transition-property: left;
10 -webkit-transition-duration: 2s;
11 -webkit-transition-timing-function: linear;
13 </style>
14 <body>
15 <p>
16 This tests changing a transitioning property while running and resetting its duration to 0.
17 The box should start moving left and after 600ms snap back to 0</p>
18 <div id="box">
19 </div>
20 <script src="../animations/resources/animation-test-helpers.js"></script>
21 <script>
22 function reset()
24 document.getElementById('box').style.webkitTransitionDuration = "0s";
25 document.getElementById('box').style.left = "0px";
28 function trigger()
30 document.getElementById('box').style.left = "400px";
33 var expectations = [
34 [0.5, 'box', 'left', 100, 50],
35 [0.7, 'box', 'left', 0, 0],
38 var callbacks = {
39 0.6: reset
42 runTransitionTest(expectations, trigger, callbacks);
43 </script>