| Index: LayoutTests/animations/animation-events-unprefixed-03.html
|
| diff --git a/LayoutTests/animations/animation-events-prefixed-02.html b/LayoutTests/animations/animation-events-unprefixed-03.html
|
| similarity index 59%
|
| copy from LayoutTests/animations/animation-events-prefixed-02.html
|
| copy to LayoutTests/animations/animation-events-unprefixed-03.html
|
| index 3cce35d131a7784ba07dc102c8410a86190a9083..58c35f57c9204a355c6b6632cbc550c8942a6cb2 100644
|
| --- a/LayoutTests/animations/animation-events-prefixed-02.html
|
| +++ b/LayoutTests/animations/animation-events-unprefixed-03.html
|
| @@ -1,7 +1,7 @@
|
| <!DOCTYPE html>
|
| <html>
|
| <head>
|
| - <title>Tests that unprefixed animation events are correctly fired when listeners are on both versions.</title>
|
| + <title>Tests that unprefixed animation events are correctly fired when using html event listeners (only unprefixed should be fired).</title>
|
| <style>
|
| #box {
|
| position: relative;
|
| @@ -33,43 +33,32 @@
|
| var iterationEventReceived = 0;
|
| var startEventReceived = false;
|
| var prefixedEventReceived = 0;
|
| - document.addEventListener('webkitAnimationStart', function() {
|
| +
|
| + function recordPrefixedEvent() {
|
| prefixedEventReceived++;
|
| - }, false);
|
| - document.addEventListener('animationstart', function() {
|
| + }
|
| +
|
| + function recordAnimationStart() {
|
| startEventReceived = true;
|
| - }, false);
|
| + }
|
|
|
| - document.addEventListener('animationiteration', function() {
|
| + function recordAnimationIteration() {
|
| ++iterationEventReceived;
|
| - }, false);
|
| - document.addEventListener('webkitAnimationIteration', function() {
|
| - prefixedEventReceived++;
|
| - }, false);
|
| + }
|
|
|
| - document.addEventListener('webkitAnimationEnd', function() {
|
| - prefixedEventReceived++;
|
| - }, false);
|
| - document.addEventListener('animationend', function() {
|
| - if (iterationEventReceived <= 2 && startEventReceived && prefixedEventReceived == 0)
|
| + function recordAnimationEnd() {
|
| + if (iterationEventReceived > 0 && iterationEventReceived <= 2 && startEventReceived && prefixedEventReceived == 0)
|
| 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 when listeners are on both versions.
|
| +Tests that unprefixed animation events are correctly fired when using html event listeners (only unprefixed should be fired).
|
| <pre id="result">FAIL: No animation events received</pre>
|
| +<div id="box" onwebkitanimationstart="recordPrefixedEvent();" onwebkitanimationend="recordPrefixedEvent();" onwebkitanimationiteration="recordPrefixedEvent();" onanimationstart="recordAnimationStart();" onanimationend="recordAnimationEnd();" onanimationiteration="recordAnimationIteration();"></div>
|
| </body>
|
| </html>
|
|
|