REGRESSION (r230574): Interrupted hardware transitions don't behave correctly
[WebKit-https.git] / LayoutTests / transitions / repeated-firing-background-color.html
1 <html>
2 <head>
3   <style>
4     div {
5         -webkit-transition: background-color .15s linear;
6     }
7     div.trans {
8         background-color: hsla(0, 50%, 50%, 1);
9     }
10   </style>
11   <script>
12     function checkRunning()
13     {
14       if (!window.testRunner) {
15         document.getElementById('result').innerHTML = "This test must be run in DRT."
16         return;
17       }
18         
19       var current = internals.numberOfActiveAnimations();
20       if (current == 0)
21         document.getElementById('result').innerHTML = "Number of active transitions is (0) as expected";
22       else
23         document.getElementById('result').innerHTML = "Number of active transitions is (" + current + ") but was expecting (0)";
24       testRunner.notifyDone();
25     }
26
27     if (window.testRunner) {
28         testRunner.dumpAsText();
29         testRunner.waitUntilDone();
30     }
31   </script>
32 </head>
33 <body>
34
35 <div id="foo">This should not be continually firing transitions</span>
36
37 <script type="text/javascript" charset="utf-8">
38
39     document.getElementById('foo').addEventListener('webkitTransitionEnd', function() {
40         checkRunning()
41     });
42
43     setTimeout(function() { document.getElementById("foo").className="trans" }, 0);
44 </script>
45
46 <div id="result">
47 </div>
48 </body>
49 </html>