Index: LayoutTests/animations/animation-events-prefixed-03.html |
diff --git a/LayoutTests/animations/animation-events-unprefixed-01.html b/LayoutTests/animations/animation-events-prefixed-03.html |
similarity index 63% |
copy from LayoutTests/animations/animation-events-unprefixed-01.html |
copy to LayoutTests/animations/animation-events-prefixed-03.html |
index 6f4195407eafa9670ee88c4ebd1dd77ad381d8ce..fde2521d59c07498bc617bf1116afbfc66ce5577 100644 |
--- a/LayoutTests/animations/animation-events-unprefixed-01.html |
+++ b/LayoutTests/animations/animation-events-prefixed-03.html |
@@ -1,7 +1,7 @@ |
<!DOCTYPE html> |
<html> |
<head> |
- <title>Tests that unprefixed animation events are correctly fired.</title> |
+ <title>Tests that prefixed 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 prefixed animation events are correctly fired when using html event listeners. |
<pre id="result">FAIL: No animation events received</pre> |
+<div id="box" onwebkitanimationstart="recordAnimationStart();" onwebkitanimationend="recordAnimationEnd();" onwebkitanimationiteration="recordAnimationIteration();"></div> |
</body> |
</html> |