Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / transition-end-event-prefixed-02.html
blob71a8c7126cdbe6df961846da3eaece7098304832
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <style>
6 .box {
7 position: relative;
8 left: 0;
9 height: 100px;
10 width: 100px;
11 margin: 10px;
12 background-color: blue;
13 -webkit-transition-property: width;
14 -webkit-transition-duration: 0.5s;
16 </style>
17 <script src="transition-end-event-helpers.js"></script>
18 <script src="../resources/js-test.js"></script>
19 <script type="text/javascript">
20 function runAnimation() {
21 var box = document.getElementById('box1');
22 box.style.width = '200px';
24 </script>
25 </head>
26 <body onLoad="runAnimation()">
27 <script type="text/javascript">
28 description("Test to make sure that if prefixed transition events are modified we correctly modify unprefixed events.");
30 if (window.testRunner)
31 testRunner.waitUntilDone();
33 var testContainer = document.createElement("div");
34 document.body.appendChild(testContainer);
36 testContainer.innerHTML = '<div id="box1" class="box"></div>';
37 var box = document.getElementById('box1');
39 var transitionEventBox;
41 function transitionEndEvent(e)
43 e.stopPropagation();
44 transitionEventBox = e;
45 shouldBe("transitionEventBox.currentTarget", "transitionEventBox.target");
46 if (window.testRunner)
47 testRunner.notifyDone();
48 document.body.removeChild(testContainer);
51 testContainer.addEventListener('webkitTransitionEnd', transitionEndEvent, false);
52 box.addEventListener('webkitTransitionEnd', transitionEndEvent, false);
53 </script>
54 </body>
55 </html>