13 <svg x=
"-250000" width=
"500000" height=
"500">
14 <path id=
"path" d=
"M 250005 104 l 19 0 l 3 3 l -3 3 l -19 0 z"></path>
18 <script src=
"../../resources/js-test.js"></script>
20 description("Test that hit-test works for a path whose x/y ranges have different magnitude.");
21 if (window
.testRunner
)
22 testRunner
.dumpAsText();
24 var resultString
= "";
25 var pathElement
= document
.getElementById("path");
33 var pointsNotInPath
= [
38 pointsInPath
.forEach( function(point
) {
39 var pass
= (pathElement
== document
.elementFromPoint(point
.x
, point
.y
));
40 resultString
+= ((pass
) ? "PASS" : "FAIL") + " path contains point at (" + point
.x
+ ", " + point
.y
+ ")\n";
42 pointsNotInPath
.forEach( function(point
) {
43 var pass
= (pathElement
!= document
.elementFromPoint(point
.x
, point
.y
));
44 resultString
+= ((pass
) ? "PASS" : "FAIL") + " path does not contain point at (" + point
.x
+ ", " + point
.y
+ ")\n";