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

Unified Diff: LayoutTests/svg/animations/script-tests/animate-no-matching-end-value.js

Issue 22604002: [SVG] Interval should not be created if a value in begin-value-list doesn't have a matching value i… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaselined 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
Index: LayoutTests/svg/animations/script-tests/animate-no-matching-end-value.js
diff --git a/LayoutTests/svg/animations/script-tests/animate-no-matching-end-value.js b/LayoutTests/svg/animations/script-tests/animate-no-matching-end-value.js
new file mode 100755
index 0000000000000000000000000000000000000000..1fa38c33d391ba97f44fa4acadc5877e523784df
--- /dev/null
+++ b/LayoutTests/svg/animations/script-tests/animate-no-matching-end-value.js
@@ -0,0 +1,33 @@
+description("Test animate intervals having begin-value without a matching end-value");
+embedSVGTestCase("resources/animate-no-matching-end-value.svg");
+
+// Setup animation test
+function sample1() {
+ shouldBeCloseEnough("rect1.x.animVal.value", "0");
+ shouldBe("rect1.x.baseVal.value", "0");
+}
+
+function sample2() {
+ shouldBeCloseEnough("rect1.x.animVal.value", "100");
+ shouldBe("rect1.x.baseVal.value", "0");
+}
+
+function executeTest() {
+ var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
+ rect1 = rects[0];
+
+ const expectedValues = [
+ // [animationId, time, sampleCallback]
+ ["anim", 0.0, sample1],
+ ["anim", 1.0, sample2],
+ ["anim", 2.0, sample1],
+ ["anim", 3.0, sample2],
+ ["anim", 4.0, sample1],
+ ["anim", 5.0, sample1]
+ ];
+
+ runAnimationTest(expectedValues);
+}
+
+window.animationStartsImmediately = true;
+var successfullyParsed = true;
« no previous file with comments | « LayoutTests/svg/animations/resources/animate-no-matching-end-value.svg ('k') | Source/core/svg/animation/SVGSMILElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698