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