| Index: LayoutTests/animations/animation-events-unprefixed-02.html
|
| diff --git a/LayoutTests/animations/animation-events-unprefixed-01.html b/LayoutTests/animations/animation-events-unprefixed-02.html
|
| similarity index 66%
|
| copy from LayoutTests/animations/animation-events-unprefixed-01.html
|
| copy to LayoutTests/animations/animation-events-unprefixed-02.html
|
| index 6f4195407eafa9670ee88c4ebd1dd77ad381d8ce..d45c88e1dcabfe01c7eab46bd1442e230972ac9a 100644
|
| --- a/LayoutTests/animations/animation-events-unprefixed-01.html
|
| +++ b/LayoutTests/animations/animation-events-unprefixed-02.html
|
| @@ -1,7 +1,7 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| - <title>Tests that unprefixed animation events are correctly fired.</title>
|
| + <title>Tests that unprefixed animation events are correctly fired when using html event listeners.</title>
|
| <style>
|
| #box {
|
| position: relative;
|
| @@ -31,33 +31,28 @@
|
|
|
| var iterationEventReceived = 0;
|
| var startEventReceived = false;
|
| - document.addEventListener('animationstart', function() {
|
| +
|
| + function recordAnimationStart() {
|
| startEventReceived = true;
|
| - }, false);
|
| - document.addEventListener('animationiteration', function() {
|
| + }
|
| +
|
| + function recordAnimationIteration() {
|
| ++iterationEventReceived;
|
| - }, false);
|
| + }
|
|
|
| - document.addEventListener('animationend', function() {
|
| - if (iterationEventReceived <= 2 && startEventReceived)
|
| + function recordAnimationEnd() {
|
| + if (iterationEventReceived > 0 && iterationEventReceived <= 2 && startEventReceived)
|
| document.getElementById('result').innerHTML = 'PASS: All events have been received as expected.';
|
| else
|
| fail();
|
| if (window.testRunner)
|
| testRunner.notifyDone();
|
| - }, false);
|
| -
|
| - onload = function()
|
| - {
|
| - // Animation begins once we append the DOM node to the document.
|
| - var boxNode = document.createElement('div');
|
| - boxNode.id = 'box';
|
| - document.body.appendChild(boxNode);
|
| }
|
| </script>
|
| </head>
|
| <body>
|
| -Tests that unprefixed animation events are correctly fired.
|
| +Tests that unprefixed animation events are correctly fired when using html event listeners.
|
| <pre id="result">FAIL: No animation events received</pre>
|
| +<div id="box" onanimationstart="recordAnimationStart();" onanimationend="recordAnimationEnd();" onanimationiteration="recordAnimationIteration();"></div>
|
| </body>
|
| </html>
|
|
|