Implement SVGGeometryElement's isPointInFill and isPointInStroke
[WebKit-https.git] / LayoutTests / svg / dom / tag-case-sensitive-svg-in-html.html
1 <!doctype html>
2 <html>
3 <html>
4 <head>
5 <script src="../../resources/js-test-pre.js"></script>
6 </head>
7 <body>
8     <!-- Testing that in SVG tags inside HTML documents match using case-insensitive mode. -->
9     <div id="content">
10         <div style="display: none">
11             <ul>
12                 <li>
13                     <SPAN id="upper1"></SPAN>
14                     <svg xmlns="http://www.w3.org/2000/svg">
15                         <g id="group1"></g>
16                         <textPath id="textPath1"></textPath>
17                         <foreignObject id="foreignObject1"></foreignObject>
18                     </svg>
19                 </li>
20             </ul>
21             <unknownTag id="unknownTag1"></unknownTag>
22         </div>
23     </div>
24     <script>
25         var content = document.getElementById("content");
26         function checkMatchingSelector(selector, elementId) {
27             shouldBe("content.querySelector('" + selector + "')", "document.getElementById('" + elementId + "')");
28             shouldBeTrue("document.getElementById('" + elementId + "').webkitMatchesSelector('" + selector + "')");
29         }
30
31         function checkNonMatchingSelector(selector) {
32             shouldBeNull("content.querySelector('" + selector + "')");
33         }
34
35         // Checking that tag name selectors still work on HTML elements when SVG is around.
36         checkMatchingSelector("SPAN", "upper1");
37         checkMatchingSelector("div ul li SPAN", "upper1");
38         checkMatchingSelector("unknownTag", "unknownTag1");
39         checkMatchingSelector("unknowntag", "unknownTag1");
40
41         checkMatchingSelector("g", "group1");
42         checkNonMatchingSelector("G");
43
44         checkMatchingSelector("textPath", "textPath1");
45         checkMatchingSelector("svg textPath", "textPath1");
46         checkNonMatchingSelector("textpath");
47         checkNonMatchingSelector("TextPath");
48
49         checkMatchingSelector("foreignObject", "foreignObject1");
50         checkMatchingSelector("svg foreignObject", "foreignObject1");
51         checkNonMatchingSelector("foreignobject");
52         checkNonMatchingSelector("ForeignObject");
53
54         checkMatchingSelector("textPath + foreignObject", "foreignObject1");
55         checkMatchingSelector("svg textPath + foreignObject", "foreignObject1");
56         checkNonMatchingSelector("textPath + foreignobject");
57         checkNonMatchingSelector("textPath + ForeignObject");
58         checkNonMatchingSelector("textpath + foreignObject");
59         checkNonMatchingSelector("TextPath + foreignObject");
60     </script>
61     <script src="../../resources/js-test-post.js"></script>
62 </body>
63 </html>