OLD | NEW |
| (Empty) |
1 // [Name] SVGLineElement-svgdom-requiredFeatures.js | |
2 // [Expected rendering result] a series of PASS messages | |
3 | |
4 createSVGTestCase(); | |
5 | |
6 var lineElement = createSVGElement("line"); | |
7 lineElement.setAttribute("x1", "20"); | |
8 lineElement.setAttribute("y1", "20"); | |
9 lineElement.setAttribute("x2", "200"); | |
10 lineElement.setAttribute("y2", "200"); | |
11 lineElement.setAttribute("stroke", "green"); | |
12 lineElement.setAttribute("stroke-width", "10px"); | |
13 | |
14 rootSVGElement.appendChild(lineElement); | |
15 | |
16 function repaintTest() { | |
17 description("Check that SVGLineElement is initially displayed"); | |
18 shouldHaveBBox("lineElement", "180", "180"); | |
19 description("Check that setting requiredFeatures to something invalid makes
it not render"); | |
20 lineElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#
BogusFeature"); | |
21 shouldHaveBBox("lineElement", "0", "0"); | |
22 description("Check that setting requiredFeatures to something valid makes it
render again"); | |
23 lineElement.requiredFeatures.replaceItem("http://www.w3.org/TR/SVG11/feature
#Shape", 0); | |
24 shouldHaveBBox("lineElement", "180", "180"); | |
25 debug("Check that adding something valid to requiredFeatures keeps rendering
the element"); | |
26 lineElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#
Gradient"); | |
27 shouldHaveBBox("lineElement", "180", "180"); | |
28 debug("Check that adding something invalid to requiredFeatures makes it not
render"); | |
29 lineElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/feature#
BogusFeature"); | |
30 shouldHaveBBox("lineElement", "0", "0"); | |
31 } | |
32 | |
33 var successfullyParsed = true; | |
OLD | NEW |