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

Unified Diff: LayoutTests/svg/animations/animate-restart-never.html

Issue 1119723002: SVG animate should respect attribute 'restart=never'. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unwanted lines Created 5 years, 8 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/animations/animate-restart-never.html
diff --git a/LayoutTests/svg/animations/animate-restart-never.html b/LayoutTests/svg/animations/animate-restart-never.html
new file mode 100644
index 0000000000000000000000000000000000000000..43ec4602b1914d05ca3a769836b1cb5945fa966c
--- /dev/null
+++ b/LayoutTests/svg/animations/animate-restart-never.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<head>
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
fs 2015/04/30 13:24:43 This test looks really complicated, and why is it
Shanmuga Pandi 2015/04/30 13:42:57 Ok. I will check for reducing the complexity.
Shanmuga Pandi 2015/05/04 13:06:28 Changed logic !!
+<script>
+window.testIsAsync = true;
+
+function finishTest() {
+ finishRepaintTest();
+}
+
+function click(x,y) {
+ if (window.eventSender) {
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ }
+}
+
+function repaintTest()
+{
+ var rect = document.getElementById('rect');
+ var anim = document.getElementById('anim');
+ var actions = [
+ function() {
+ click(50,50);
+ },
+ function() {
+ rect.setAttribute("fill", "green");
+ anim.setAttribute("from", "green");
+ anim.setAttribute("to", "red");
+ anim.setAttribute("fill", "freeze");
+ },
+ function() {
+ click(50,50);
+ },
+ function() {
+ finishTest();
+ },
+ ];
+
+ function nextAction() {
+ var f = actions.shift();
+ if (!f)
+ return;
+ f();
+ setTimeout(nextAction,50);
+ }
+ nextAction();
+}
+</script>
+</head>
+<body onload="runRepaintAndPixelTest()">
+<svg height="200" width="200">
+ <rect id="rect" width="100px" height="100px" fill="red"/>
+ <animate id="anim" xlink:href="#rect"
+ begin="rect.click"
+ dur="0.01s"
+ attributeType="xml"
+ attributeName="fill"
+ from="green" to="red"
+ repeatCount="1"
+ restart="never"/>
+</svg>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698