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

Side by Side Diff: LayoutTests/svg/animations/script-tests/animate-keySplines.js

Issue 1007843002: [svg] 'keyTimes' values should allow surrounding whitespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimationElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description("Testing correct parsing of keySplines."); 1 description("Testing correct parsing of keySplines.");
2 createSVGTestCase(); 2 createSVGTestCase();
3 3
4 // Setup test document 4 // Setup test document
5 var rect = createSVGElement("rect"); 5 var rect = createSVGElement("rect");
6 rect.setAttribute("id", "rect"); 6 rect.setAttribute("id", "rect");
7 rect.setAttribute("fill", "green"); 7 rect.setAttribute("fill", "green");
8 rect.setAttribute("x", "0"); 8 rect.setAttribute("x", "0");
9 rect.setAttribute("y", "0"); 9 rect.setAttribute("y", "0");
10 rect.setAttribute("width", "100"); 10 rect.setAttribute("width", "100");
11 rect.setAttribute("height", "100"); 11 rect.setAttribute("height", "100");
12 rect.setAttribute("onclick", "executeTest()"); 12 rect.setAttribute("onclick", "executeTest()");
13 13
14 var animate = createSVGElement("animate"); 14 var animate = createSVGElement("animate");
15 animate.setAttribute("id", "animation"); 15 animate.setAttribute("id", "animation");
16 animate.setAttribute("attributeName", "height"); 16 animate.setAttribute("attributeName", "height");
17 animate.setAttribute("calcMode", "spline"); 17 animate.setAttribute("calcMode", "spline");
18 animate.setAttribute("keySplines", "0 ,0 1 , 1 ; 0 0 , 1 , 1; .75 , 0 , 0 , .75;"); 18 animate.setAttribute("keyTimes", " 0 ; 0.3333333 ; 0.666666; 1 ");
19 animate.setAttribute("keySplines", " 0 ,0 1 , 1 ; 0 0 , 1 , 1 ; .75 , 0 , 0 , .75 ; ");
19 animate.setAttribute("values", "200;167;111;0"); 20 animate.setAttribute("values", "200;167;111;0");
20 animate.setAttribute("begin", "click"); 21 animate.setAttribute("begin", "click");
21 animate.setAttribute("dur", "9s"); 22 animate.setAttribute("dur", "9s");
22 rect.appendChild(animate); 23 rect.appendChild(animate);
23 rootSVGElement.appendChild(rect); 24 rootSVGElement.appendChild(rect);
24 25
25 // Setup animation test 26 // Setup animation test
26 function sample1() { 27 function sample1() {
27 // Check initial/end conditions 28 // Check initial/end conditions
28 shouldBeCloseEnough("rect.height.animVal.value", "167"); 29 shouldBeCloseEnough("rect.height.animVal.value", "167");
(...skipping 24 matching lines...) Expand all
53 ["animation", 3.0, sample1], 54 ["animation", 3.0, sample1],
54 ["animation", 6.0, sample2], 55 ["animation", 6.0, sample2],
55 ["animation", 8.999, sample3], 56 ["animation", 8.999, sample3],
56 ["animation", 9.001, sample4] 57 ["animation", 9.001, sample4]
57 ]; 58 ];
58 59
59 runAnimationTest(expectedValues); 60 runAnimationTest(expectedValues);
60 } 61 }
61 62
62 var successfullyParsed = true; 63 var successfullyParsed = true;
OLDNEW
« no previous file with comments | « no previous file | Source/core/svg/SVGAnimationElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698