1 description("Tests whether polygons render up to first parsing error.");
3 var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
4 var svg = svgDoc.rootElement;
6 var poly1 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
7 poly1.setAttribute("points", "80,200 80,300 150,250 80,200 250");
8 svg.appendChild(poly1);
10 shouldBe("poly1.points.numberOfItems", "4");
12 var poly2 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
13 poly2.setAttribute("points", "80,200 80,300 150,250 80,200");
14 svg.appendChild(poly2);
16 shouldBe("poly2.points.numberOfItems", "4");
18 var poly3 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
19 poly3.setAttribute("points", "180,200 180,300 250,250 180,200");
20 svg.appendChild(poly3);
22 shouldBe("poly3.points.numberOfItems", "4");
24 var poly4 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
25 poly4.setAttribute("points", "180,200 180,300 250,250 180,200 250");
26 svg.appendChild(poly4);
28 shouldBe("poly4.points.numberOfItems", "4");
30 var poly5 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
31 poly5.setAttribute("points", "80,60 80,160 150,110 80");
32 svg.appendChild(poly5);
34 shouldBe("poly5.points.numberOfItems", "3");
36 var poly6 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
37 poly6.setAttribute("points", "80,60 80,160 150,110");
38 svg.appendChild(poly6);
40 shouldBe("poly6.points.numberOfItems", "3");
42 var poly7 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
43 poly7.setAttribute("points", "180,60 180,160 250,110");
44 svg.appendChild(poly7);
46 shouldBe("poly7.points.numberOfItems", "3");
48 var poly8 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
49 poly8.setAttribute("points", "180,60 180,160 250,110 180");
50 svg.appendChild(poly8);
52 shouldBe("poly8.points.numberOfItems", "3");
54 var successfullyParsed = true;