OLD | NEW |
1 description("This test checks the use of SVGAnimatedEnumeration within SVGFEBlen
dElement"); | 1 description("This test checks the use of SVGAnimatedEnumeration within SVGFEBlen
dElement"); |
2 | 2 |
3 var feBlendElement = document.createElementNS("http://www.w3.org/2000/svg", "feB
lend"); | 3 var feBlendElement = document.createElementNS("http://www.w3.org/2000/svg", "feB
lend"); |
4 feBlendElement.setAttribute("mode", "normal"); | 4 feBlendElement.setAttribute("mode", "normal"); |
5 | 5 |
6 debug(""); | 6 debug(""); |
7 debug("Check initial 'mode' value"); | 7 debug("Check initial 'mode' value"); |
8 shouldBeEqualToString("feBlendElement.mode.toString()", "[object SVGAnimatedEnum
eration]"); | 8 shouldBeEqualToString("feBlendElement.mode.toString()", "[object SVGAnimatedEnum
eration]"); |
9 shouldBeEqualToString("typeof(feBlendElement.mode.baseVal)", "number"); | 9 shouldBeEqualToString("typeof(feBlendElement.mode.baseVal)", "number"); |
10 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM
AL"); | 10 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM
AL"); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 shouldThrow("feBlendElement.mode.baseVal = 0"); | 46 shouldThrow("feBlendElement.mode.baseVal = 0"); |
47 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGH
TEN"); | 47 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGH
TEN"); |
48 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); | 48 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); |
49 | 49 |
50 debug(""); | 50 debug(""); |
51 debug("Switch to 'normal'"); | 51 debug("Switch to 'normal'"); |
52 shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_NORMA
L", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL"); | 52 shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_NORMA
L", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL"); |
53 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM
AL"); | 53 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_NORM
AL"); |
54 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "normal"); | 54 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "normal"); |
55 | 55 |
| 56 debug(""); |
| 57 debug("baseVal access when mode is set to a value not in SVGFEBlendElement.SVG_F
EBLEND_MODE_*."); |
| 58 feBlendElement.setAttribute("mode", "color-dodge"); |
| 59 shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_UNKN
OWN"); |
| 60 shouldThrow("feBlendElement.mode.baseVal = 13"); |
| 61 shouldBeEqualToString("feBlendElement.getAttribute('mode')", "color-dodge"); |
| 62 |
56 successfullyParsed = true; | 63 successfullyParsed = true; |
OLD | NEW |