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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/animations/script-tests/animateMotion-still.js

Issue 1418663004: SVG animateMotion paths that only cause offsets are no longer ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 description("Test for animation freeze when repeatDur is not a multiple of dur") ; 1 description("Test animations that only express an offset");
2 embedSVGTestCase("resources/animateMotion-fill-freeze.svg"); 2 embedSVGTestCase("resources/animateMotion-still.svg");
3 3
4 // Setup animation test 4 // Setup animation test
5 function sample1() { 5 function sample1() {
6 shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
7 }
8
9 function sample2() {
10 shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
11 }
12
13 function sample3() {
6 shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); 14 shouldBeCloseEnough("rootSVGElement.getBBox().x", "0");
7 } 15 }
8 16
9 function sample2() {
10 shouldBeCloseEnough("rootSVGElement.getBBox().x", "50");
11 }
12
13 function sample3() {
14 shouldBeCloseEnough("rootSVGElement.getBBox().x", "100");
15 }
16
17 function sample4() { 17 function sample4() {
18 shouldBeCloseEnough("rootSVGElement.getBBox().x", "100"); 18 shouldBeCloseEnough("rootSVGElement.getBBox().x", "0");
19 } 19 }
20 20
21 function executeTest() { 21 function executeTest() {
22 var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); 22 var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect");
23 rect1 = rects[0]; 23 rect1 = rects[0];
24 24
25 const expectedValues = [ 25 const expectedValues = [
26 // [animationId, time, sampleCallback] 26 // [animationId, time, sampleCallback]
27 ["anim", 0.0, sample1], 27 ["anim", 0.0, sample1],
28 ["anim", 2.0, sample2], 28 ["anim", 2.0, sample2],
29 ["anim", 4.0, sample3], 29 ["anim", 4.0, sample3],
30 ["anim", 6.0, sample4] 30 ["anim", 6.0, sample4]
31 ]; 31 ];
32 32
33 runAnimationTest(expectedValues); 33 runAnimationTest(expectedValues);
34 } 34 }
35 35
36 window.animationStartsImmediately = true; 36 window.animationStartsImmediately = true;
37 var successfullyParsed = true; 37 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698