| OLD | NEW |
| (Empty) |
| 1 description("This test checks the SVGAnimatedInteger API - utilizing the targetX
property of SVGFEConvolveMatrix"); | |
| 2 | |
| 3 var feConvolveMatrix = document.createElementNS("http://www.w3.org/2000/svg", "f
eConvolveMatrix"); | |
| 4 | |
| 5 debug(""); | |
| 6 debug("Check initial targetX value"); | |
| 7 shouldBeEqualToString("feConvolveMatrix.targetX.toString()", "[object SVGAnimate
dInteger]"); | |
| 8 shouldBeEqualToString("typeof(feConvolveMatrix.targetX.baseVal)", "number"); | |
| 9 shouldBe("feConvolveMatrix.targetX.baseVal", "0"); | |
| 10 | |
| 11 debug(""); | |
| 12 debug("Check that integers are static, caching value in a local variable and mod
ifying it, should have no effect"); | |
| 13 var numRef = feConvolveMatrix.targetX.baseVal; | |
| 14 numRef = 100; | |
| 15 shouldBe("numRef", "100"); | |
| 16 shouldBe("feConvolveMatrix.targetX.baseVal", "0"); | |
| 17 | |
| 18 debug(""); | |
| 19 debug("Check assigning various valid and invalid values"); | |
| 20 shouldBe("feConvolveMatrix.targetX.baseVal = -1", "-1"); // Negative values are
allowed from SVG DOM, but should lead to an error when rendering (disable the fi
lter) | |
| 21 shouldBe("feConvolveMatrix.targetX.baseVal = 300", "300"); | |
| 22 // ECMA-262, 9.5, "ToInt32" | |
| 23 shouldBe("feConvolveMatrix.targetX.baseVal = 'aString'", "'aString'"); | |
| 24 shouldBe("feConvolveMatrix.targetX.baseVal", "0"); | |
| 25 shouldBe("feConvolveMatrix.targetX.baseVal = feConvolveMatrix", "feConvolveMatri
x"); | |
| 26 shouldBe("feConvolveMatrix.targetX.baseVal", "0"); | |
| 27 shouldBe("feConvolveMatrix.targetX.baseVal = 300", "300"); | |
| 28 | |
| 29 debug(""); | |
| 30 debug("Check that the targetX value remained 300"); | |
| 31 shouldBe("feConvolveMatrix.targetX.baseVal", "300"); | |
| 32 | |
| 33 successfullyParsed = true; | |
| OLD | NEW |