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

Unified Diff: LayoutTests/svg/as-background-image/animated-svg-animation-control.html

Issue 206033005: Rewind the timeline for SVG-in-<img> when resetAnimation() is called (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
Index: LayoutTests/svg/as-background-image/animated-svg-animation-control.html
diff --git a/LayoutTests/svg/as-background-image/animated-svg-animation-control.html b/LayoutTests/svg/as-background-image/animated-svg-animation-control.html
new file mode 100644
index 0000000000000000000000000000000000000000..d4c9d75e3a1bcd009fab97988836de2756eee1a6
--- /dev/null
+++ b/LayoutTests/svg/as-background-image/animated-svg-animation-control.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<title>SVG-in-&lt;img&gt;: Animation resets when all references are removed.</title>
+<div style="width: 100px; height: 100px;"></div>
+<script>
+if (window.testRunner)
+ testRunner.waitUntilDone();
+var div = document.querySelector('div');
+var imgurl = "url(\"data:image/svg+xml," +
+ "<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'>" +
+ "<rect width='100' height='100' fill='blue'>" +
+ "<set attributeName='fill' to='green' dur='0.1s'/>" +
+ "</rect>" +
+ "</svg>\")";
kouhei (in TOK) 2014/03/20 15:27:29 Maybe we can have this as a svg file in LayoutTest
fs 2014/03/20 17:02:17 Done. (But to as-background-image/resources/ - I g
+div.style.background = imgurl;
kouhei (in TOK) 2014/03/20 15:27:29 There are LayoutTests/svg/as-image/ testing svg in
fs 2014/03/20 17:02:17 The bug was reported against 'background-image' so
+setTimeout(function() {
+ div.style.background = "";
+ setTimeout(function() {
+ div.style.background = imgurl;
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 10);
+}, 150);
+</script>
+

Powered by Google App Engine
This is Rietveld 408576698