| Index: third_party/WebKit/LayoutTests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js
|
| diff --git a/third_party/WebKit/LayoutTests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js b/third_party/WebKit/LayoutTests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js
|
| index dd974befee6240ad9cc2d87d86eeacac4d728d46..268f9ce9ce4cf2619d3fe20cad28601e0dd95da5 100644
|
| --- a/third_party/WebKit/LayoutTests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js
|
| +++ b/third_party/WebKit/LayoutTests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js
|
| @@ -20,89 +20,21 @@ path.appendChild(animate);
|
| rootSVGElement.appendChild(path);
|
|
|
| // Setup animation test
|
| -function checkBaseVal() {
|
| - shouldBe("path.pathSegList.numberOfItems", "4");
|
| - shouldBeEqualToString("path.pathSegList.getItem(0).pathSegTypeAsLetter", "M");
|
| - shouldBe("path.pathSegList.getItem(0).x", "-30");
|
| - shouldBe("path.pathSegList.getItem(0).y", "-30");
|
| - shouldBeEqualToString("path.pathSegList.getItem(1).pathSegTypeAsLetter", "Q");
|
| - shouldBe("path.pathSegList.getItem(1).x", "30");
|
| - shouldBe("path.pathSegList.getItem(1).y", "0");
|
| - shouldBe("path.pathSegList.getItem(1).x1", "30");
|
| - shouldBe("path.pathSegList.getItem(1).y1", "-30");
|
| - shouldBeEqualToString("path.pathSegList.getItem(2).pathSegTypeAsLetter", "T");
|
| - shouldBe("path.pathSegList.getItem(2).x", "-30");
|
| - shouldBe("path.pathSegList.getItem(2).y", "30");
|
| - shouldBeEqualToString("path.pathSegList.getItem(3).pathSegTypeAsLetter", "Z");
|
| -}
|
| -
|
| function sample1() {
|
| // Check initial/end conditions
|
| - shouldBe("path.animatedPathSegList.numberOfItems", "4");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(0).pathSegTypeAsLetter", "M");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).y", "-30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(1).pathSegTypeAsLetter", "Q");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x", "30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y", "0");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x1", "30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y1", "-30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(2).pathSegTypeAsLetter", "T");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).y", "30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(3).pathSegTypeAsLetter", "Z");
|
| - checkBaseVal();
|
| + shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 Q 30 -30 30 0 T -30 30 Z");
|
| }
|
|
|
| function sample2() {
|
| - shouldBe("path.animatedPathSegList.numberOfItems", "4");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(0).pathSegTypeAsLetter", "M");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).y", "-30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(1).pathSegTypeAsLetter", "Q");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x", "22.5");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y", "0");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x1", "22.5");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y1", "-30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(2).pathSegTypeAsLetter", "T");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).y", "30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(3).pathSegTypeAsLetter", "Z");
|
| - checkBaseVal();
|
| + shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z");
|
| }
|
|
|
| function sample3() {
|
| - shouldBe("path.animatedPathSegList.numberOfItems", "4");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(0).pathSegTypeAsLetter", "M");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).y", "-30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(1).pathSegTypeAsLetter", "q");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x", "37.5");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y", "30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x1", "37.5");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y1", "0");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(2).pathSegTypeAsLetter", "t");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).x", "-37.5");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).y", "30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(3).pathSegTypeAsLetter", "Z");
|
| - checkBaseVal();
|
| + shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z");
|
| }
|
|
|
| function sample4() {
|
| - shouldBe("path.animatedPathSegList.numberOfItems", "4");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(0).pathSegTypeAsLetter", "M");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(0).y", "-30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(1).pathSegTypeAsLetter", "q");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x", "30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y", "30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).x1", "30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(1).y1", "0");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(2).pathSegTypeAsLetter", "t");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).x", "-30");
|
| - shouldBeCloseEnough("path.animatedPathSegList.getItem(2).y", "30");
|
| - shouldBeEqualToString("path.animatedPathSegList.getItem(3).pathSegTypeAsLetter", "Z");
|
| - checkBaseVal();
|
| + shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 q 30.0075 0 30.0075 30 t -30.0075 30 Z");
|
| }
|
|
|
| function executeTest() {
|
|
|