2008-09-01 Dean Jackson <dino@apple.com>
[WebKit-https.git] / LayoutTests / transitions / transition-end-event-transform.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: -webkit-transform;
13       -webkit-transition-duration: 0.5s;
14       -webkit-transform: translate(100px);
15     }
16   </style>
17   <script src="end-event-helpers.js" type="text/javascript" charset="utf-8"></script>
18   <script type="text/javascript" charset="utf-8">
19     if (window.layoutTestController) {
20         layoutTestController.dumpAsText();
21         layoutTestController.waitUntilDone();
22     }
23
24     var expected = [
25       ["-webkit-transform", "box1", "webkitTransitionEnd", 0.5]
26     ];
27     
28     function startTransition()
29     {
30       var boxes = document.body.getElementsByClassName('box');
31       for (var i = 0; i < boxes.length; ++i) {
32         boxes[i].addEventListener("webkitTransitionEnd", recordEvent, false);
33         boxes[i].style.webkitTransform = 'translate(200px)';
34       }
35       
36       window.setTimeout(cleanup, 700);
37     }
38     
39     window.addEventListener('load', startTransition, false);
40   </script>
41 </head>
42 <body>
43
44 <p>Initiating a 500ms transition on the transform property of box1.</p>
45
46 <div id="container">
47   <div id="box1" class="box"></div>
48 </div>
49
50 <div id="result"></div>
51
52 </body>
53 </html>