2008-09-01 Dean Jackson <dino@apple.com>
[WebKit-https.git] / LayoutTests / transitions / transition-end-event-attributes.html
1 <html>
2 <head>
3   <title>Transition End Events</title>
4   <style type="text/css" media="screen">
5     .box {
6       position: relative;
7       left: 0;
8       height: 100px;
9       width: 100px;
10       margin: 10px;
11       background-color: blue;
12       -webkit-transition-property: left;
13       -webkit-transition-duration: 0.5s;
14     }
15   </style>
16   <script src="end-event-helpers.js" type="text/javascript" charset="utf-8"></script>
17   <script type="text/javascript" charset="utf-8">
18     if (window.layoutTestController) {
19         layoutTestController.dumpAsText();
20         layoutTestController.waitUntilDone();
21     }
22     
23     var expected = [
24       ['left', 'box1', 'webkitTransitionEnd', 0.5]
25     ];
26
27     function startTransition()
28     {
29       var boxes = document.body.getElementsByClassName('box');
30       for (var i = 0; i < boxes.length; ++i) {
31         boxes[i].style.left = '200px';
32       }
33       
34       window.setTimeout(cleanup, 700);
35     }
36     
37     window.addEventListener('load', startTransition, false);
38   </script>
39 </head>
40 <body>
41
42 <p>Initiating a 500ms transition on the left property of box1.</p>
43
44 <div id="container">
45   <div id="box1" class="box" onwebkittransitionend="recordEvent(event);"></div>
46 </div>
47
48 <div id="result"></div>
49
50 </body>
51 </html>