OLD | NEW |
| (Empty) |
1 description("This test checks the SVGAnimatedBoolean API - utilizing the preserv
eAlpha property of SVGFEConvolveMatrixElement"); | |
2 | |
3 var convElement = document.createElementNS("http://www.w3.org/2000/svg", "feConv
olveMatrix"); | |
4 debug(""); | |
5 debug("Check initial preserveAlpha value"); | |
6 shouldBe("convElement.preserveAlpha.baseVal", "false"); | |
7 | |
8 debug(""); | |
9 debug("Set value to true"); | |
10 shouldBe("convElement.preserveAlpha.baseVal = true", "true"); | |
11 | |
12 debug(""); | |
13 debug("Caching baseVal in local variable"); | |
14 var baseVal = convElement.preserveAlpha.baseVal; | |
15 shouldBe("baseVal", "true"); | |
16 | |
17 debug(""); | |
18 debug("Modify local baseVal variable to true"); | |
19 shouldBeFalse("baseVal = false"); | |
20 | |
21 debug(""); | |
22 debug("Assure that convElement.preserveAlpha has not been changed, but the local
baseVal variable"); | |
23 shouldBe("baseVal", "false"); | |
24 shouldBe("convElement.preserveAlpha.baseVal", "true"); | |
25 | |
26 debug(""); | |
27 debug("Check assigning values of various types"); | |
28 // ECMA-262, 9.2, "ToBoolean" | |
29 shouldBe("convElement.preserveAlpha.baseVal = convElement.preserveAlpha", "convE
lement.preserveAlpha"); | |
30 shouldBe("convElement.preserveAlpha.baseVal", "true"); | |
31 shouldBeNull("convElement.preserveAlpha.baseVal = null"); | |
32 shouldBe("convElement.preserveAlpha.baseVal", "false"); | |
33 shouldBe("convElement.preserveAlpha.baseVal = 'aString'", "'aString'"); | |
34 shouldBe("convElement.preserveAlpha.baseVal", "true"); | |
35 convElement.preserveAlpha.baseVal = false; | |
36 shouldBe("convElement.preserveAlpha.baseVal = convElement", "convElement"); | |
37 shouldBe("convElement.preserveAlpha.baseVal", "true"); | |
38 | |
39 successfullyParsed = true; | |
OLD | NEW |