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

Unified Diff: LayoutTests/svg/animations/multiple-begin-animation-events.html

Issue 141013017: Make sure begin and end events are dispatched for back-to-back intervals (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove borked ASSERT. Created 6 years, 10 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/svg/animations/multiple-begin-animation-events-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/svg/animations/multiple-begin-animation-events.html
diff --git a/LayoutTests/svg/animations/multiple-begin-animation-events.html b/LayoutTests/svg/animations/multiple-begin-animation-events.html
new file mode 100644
index 0000000000000000000000000000000000000000..72df069c4dbcc769276b281955b5cc063f1207fd
--- /dev/null
+++ b/LayoutTests/svg/animations/multiple-begin-animation-events.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<script>
+var beginsSeen = 0;
+var endsSeen = 0;
+function logBegin() {
+ if (++beginsSeen > 4)
+ fail();
+}
+function logEnd() {
+ ++endsSeen;
+ if (endsSeen == 4) {
+ if (beginsSeen == 4)
+ pass();
+ else
+ fail();
+ }
+}
+function endTest(result) {
+ window.clearTimeout(timer);
+ document.body.appendChild(document.createTextNode(result));
+ if (window.testRunner)
+ testRunner.notifyDone();
+}
+function pass() {
+ endTest('PASS');
+}
+function fail() {
+ endTest('FAIL');
+}
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+window.onload = function() {
+ timer = window.setTimeout(fail, 2000);
+}
+</script>
+<svg id="svg" xmlns="http://www.w3.org/2000/svg" height="200">
+ <rect width="10" height="10" fill="green">
+ <animate id="a1" onbegin="logBegin()" onend="logEnd()" attributeName="x" begin="0s; 0.5s" dur="0.5s" from="0" to="100"/>
+ </rect>
+ <rect y="10" width="10" height="10" fill="green">
+ <animate id="a2" onbegin="logBegin()" onend="logEnd()" attributeName="x" begin="a1.end; 1s" dur="0.5s" from="0" to="100"/>
+ </rect>
+</svg>
« no previous file with comments | « no previous file | LayoutTests/svg/animations/multiple-begin-animation-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698