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

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

Issue 963733002: [svg2] Make 'width' and 'height' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebaseline some EX tests [Mac Win] 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
OLDNEW
1 description("This verifies several attributeTypes combiniations"); 1 description("This verifies several attributeTypes combiniations");
2 embedSVGTestCase("resources/attributeTypes.svg"); 2 embedSVGTestCase("resources/attributeTypes.svg");
3 3
4 // Setup animation test 4 // Setup animation test
5 function sample1() { 5 function sample1() {
6 shouldBeCloseEnough("rect1.width.animVal.value", "10"); 6 shouldBeCloseEnough("rect1.width.animVal.value", "10");
7 shouldBe("rect1.width.baseVal.value", "10"); 7 shouldBe("rect1.width.baseVal.value", "10");
8 expectFillColor(rect1, 0, 128, 0); 8 expectFillColor(rect1, 0, 128, 0);
9 9
10 shouldBe("rect2.width.animVal.value", "100"); 10 shouldBe("rect2.width.animVal.value", "10");
11 shouldBe("rect2.width.baseVal.value", "100"); 11 shouldBe("rect2.width.baseVal.value", "10");
12 expectFillColor(rect2, 0, 128, 0); 12 expectFillColor(rect2, 0, 128, 0);
13 13
14 shouldBe("rect3.width.animVal.value", "100"); 14 shouldBe("rect3.width.animVal.value", "100");
15 shouldBe("rect3.width.baseVal.value", "100"); 15 shouldBe("rect3.width.baseVal.value", "100");
16 expectFillColor(rect3, 255, 0, 0); 16 expectFillColor(rect3, 255, 0, 0);
17 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); 17 shouldBeEqualToString("rect3.getAttribute('fill')", "red");
18 18
19 shouldBe("rect4.width.animVal.value", "100"); 19 shouldBe("rect4.width.animVal.value", "100");
20 shouldBe("rect4.width.baseVal.value", "100"); 20 shouldBe("rect4.width.baseVal.value", "100");
21 expectFillColor(rect4, 255, 0, 0); 21 expectFillColor(rect4, 255, 0, 0);
22 shouldBeEqualToString("rect4.getAttribute('fill')", "red"); 22 shouldBeEqualToString("rect4.getAttribute('fill')", "red");
23 } 23 }
24 24
25 function sample2() { 25 function sample2() {
26 shouldBeCloseEnough("rect1.width.animVal.value", "55"); 26 shouldBeCloseEnough("rect1.width.animVal.value", "55");
27 shouldBe("rect1.width.baseVal.value", "10"); 27 shouldBe("rect1.width.baseVal.value", "10");
28 expectFillColor(rect1, 0, 128, 0); 28 expectFillColor(rect1, 0, 128, 0);
29 29
30 shouldBe("rect2.width.animVal.value", "100"); 30 shouldBe("rect2.width.animVal.value", "55");
31 shouldBe("rect2.width.baseVal.value", "100"); 31 shouldBe("rect2.width.baseVal.value", "10");
32 expectFillColor(rect2, 0, 128, 0); 32 expectFillColor(rect2, 0, 128, 0);
33 33
34 shouldBe("rect3.width.animVal.value", "100"); 34 shouldBe("rect3.width.animVal.value", "100");
35 shouldBe("rect3.width.baseVal.value", "100"); 35 shouldBe("rect3.width.baseVal.value", "100");
36 expectFillColor(rect3, 128, 64, 0); 36 expectFillColor(rect3, 128, 64, 0);
37 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); 37 shouldBeEqualToString("rect3.getAttribute('fill')", "red");
38 38
39 shouldBe("rect4.width.animVal.value", "100"); 39 shouldBe("rect4.width.animVal.value", "100");
40 shouldBe("rect4.width.baseVal.value", "100"); 40 shouldBe("rect4.width.baseVal.value", "100");
41 expectFillColor(rect4, 128, 64, 0); 41 expectFillColor(rect4, 128, 64, 0);
42 shouldBeEqualToString("rect4.getAttribute('fill')", "red"); 42 shouldBeEqualToString("rect4.getAttribute('fill')", "red");
43 } 43 }
44 44
45 function sample3() { 45 function sample3() {
46 shouldBeCloseEnough("rect1.width.animVal.value", "100"); 46 shouldBeCloseEnough("rect1.width.animVal.value", "100");
47 shouldBe("rect1.width.baseVal.value", "10"); 47 shouldBe("rect1.width.baseVal.value", "10");
48 expectFillColor(rect1, 0, 128, 0); 48 expectFillColor(rect1, 0, 128, 0);
49 49
50 shouldBe("rect2.width.animVal.value", "100"); 50 shouldBe("rect2.width.animVal.value", "100");
51 shouldBe("rect2.width.baseVal.value", "100"); 51 shouldBe("rect2.width.baseVal.value", "10");
52 expectFillColor(rect2, 0, 128, 0); 52 expectFillColor(rect2, 0, 128, 0);
53 53
54 shouldBe("rect3.width.animVal.value", "100"); 54 shouldBe("rect3.width.animVal.value", "100");
55 shouldBe("rect3.width.baseVal.value", "100"); 55 shouldBe("rect3.width.baseVal.value", "100");
56 expectFillColor(rect3, 0, 128, 0); 56 expectFillColor(rect3, 0, 128, 0);
57 shouldBeEqualToString("rect3.getAttribute('fill')", "red"); 57 shouldBeEqualToString("rect3.getAttribute('fill')", "red");
58 58
59 shouldBe("rect4.width.animVal.value", "100"); 59 shouldBe("rect4.width.animVal.value", "100");
60 shouldBe("rect4.width.baseVal.value", "100"); 60 shouldBe("rect4.width.baseVal.value", "100");
61 expectFillColor(rect4, 0, 128, 0); 61 expectFillColor(rect4, 0, 128, 0);
(...skipping 14 matching lines...) Expand all
76 ["an1", 2.0, sample2], 76 ["an1", 2.0, sample2],
77 ["an1", 4.0, sample3], 77 ["an1", 4.0, sample3],
78 ["an1", 60.0, sample3], 78 ["an1", 60.0, sample3],
79 ]; 79 ];
80 80
81 runAnimationTest(expectedValues); 81 runAnimationTest(expectedValues);
82 } 82 }
83 83
84 window.animationStartsImmediately = true; 84 window.animationStartsImmediately = true;
85 var successfullyParsed = true; 85 var successfullyParsed = true;
OLDNEW
« no previous file with comments | « LayoutTests/svg/animations/resources/attributeTypes.svg ('k') | LayoutTests/svg/custom/mask-excessive-malloc-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698