Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: LayoutTests/animations/animation-events-prefixed-03.html

Issue 23583032: Add onanimationXXX attributes on HTML elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/animations/animation-events-prefixed-03-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/animations/animation-events-prefixed-03-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698