Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / repeated-firing-background-color.html
bloba14fa20b536e73994f3de521e6e7f109a939924a
1 <html>
2 <head>
3 <style>
4 div {
5 -webkit-transition: background-color .15s linear;
7 div.trans {
8 background-color: hsla(0, 50%, 50%, 1);
10 </style>
11 <script>
12 function checkRunning()
14 var current = document.timeline.getAnimations().length;
15 if (current == 0)
16 document.getElementById('result').innerHTML = "PASS: Number of active transitions is (0) as expected";
17 else
18 document.getElementById('result').innerHTML = "FAIL: Number of active transitions is (" + current + ") but was expecting (0)";
19 testRunner.notifyDone();
22 if (window.testRunner) {
23 testRunner.dumpAsText();
24 testRunner.waitUntilDone();
26 </script>
27 </head>
28 <body>
30 <div id="foo">This should not be continually firing transitions</span>
32 <script type="text/javascript" charset="utf-8">
33 // Force a layout so that changing the classname below causes an animation.
34 document.body.offsetHeight;
36 document.getElementById('foo').addEventListener('webkitTransitionEnd', function() {
37 setTimeout(checkRunning, 0);
38 });
40 document.getElementById("foo").className="trans";
41 </script>
43 <div id="result">
44 </div>
45 </body>
46 </html>