Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / animations / state-at-end-event.html
blob149bd43baef2ca3c4f9cd796057f5642a3d0a2d9
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <html lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <style>
8 #container {
9 position: relative;
10 width: 400px;
11 height: 100px;
12 border: 1px solid black;
15 .box {
16 position: absolute;
17 width: 100px;
18 height: 100px;
19 background-color: green;
22 .indicator {
23 left: 0;
24 top: 0;
25 background-color: red;
28 #container.moved .hardware {
29 -webkit-animation: move 300ms linear;
32 @-webkit-keyframes move {
33 from { left: 0; }
34 to { left: 300px; }
36 </style>
37 <script type="text/javascript" charset="utf-8">
39 function testEnded()
41 if (window.layoutTestController)
42 layoutTestController.notifyDone();
45 function startTest()
47 if (window.layoutTestController)
48 layoutTestController.waitUntilDone();
50 document.getElementById('tester').addEventListener('webkitAnimationEnd', testEnded, false);
51 document.getElementById('container').className = 'moved';
54 window.addEventListener('load', startTest, false);
55 </script>
56 </head>
57 <body>
59 <p>At the end of the test the green box should obscure the red box.</p>
60 <div id="container">
61 <div class="indicator box"></div>
62 <div id="tester" class="hardware box"></div>
63 </div>
65 <div id="result">
66 </div>
68 </body>
69 </html>