Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: LayoutTests/svg/hittest/svg-ellipse.xhtml

Issue 62943002: Implement SVGGeometryElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update copyrights Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/svg/hittest/svg-ellipse.xhtml
diff --git a/LayoutTests/svg/hittest/svg-ellipse.xhtml b/LayoutTests/svg/hittest/svg-ellipse.xhtml
index 513eff98afb3c1d2bfee72ee11164e17811de72b..ea9e1497ae9bb35b45b491f9aa8edde32f247938 100644
--- a/LayoutTests/svg/hittest/svg-ellipse.xhtml
+++ b/LayoutTests/svg/hittest/svg-ellipse.xhtml
@@ -56,6 +56,35 @@
{x: 150, y: 150} // inside ellipse
];
+ resultString += "Testing isPointInFill/isPointInStroke\n";
pdr. 2013/11/09 00:20:08 I don't think we have sufficient test coverage of
+ var mySVGPoint = ellipseElement.ownerSVGElement.createSVGPoint();
+ pointsInEllipse.forEach( function(point) {
+ mySVGPoint.x = point.x;
+ mySVGPoint.y = point.y;
+ var pass = ellipseElement.isPointInFill(mySVGPoint);
+ resultString += ((pass) ? "PASS" : "FAIL") + " ellipse contains point at (" + point.x + ", " + point.y + ")\n";
+ });
+ pointsNotInEllipse.forEach( function(point) {
+ mySVGPoint.x = point.x;
+ mySVGPoint.y = point.y;
+ var pass = ellipseElement.isPointInFill(mySVGPoint) == false;
+ resultString += ((pass) ? "PASS" : "FAIL") + " ellipse does not contain point at (" + point.x + ", " + point.y + ")\n";
+ });
+
+ pointsOnEllipseStroke.forEach( function(point) {
+ mySVGPoint.x = point.x;
+ mySVGPoint.y = point.y;
+ var pass = ellipseElement.isPointInStroke(mySVGPoint);
+ resultString += ((pass) ? "PASS" : "FAIL") + " ellipse stroke contains point at (" + point.x + ", " + point.y + ")\n";
+ });
+ pointsNotOnEllipseStroke.forEach( function(point) {
+ mySVGPoint.x = point.x;
+ mySVGPoint.y = point.y;
+ var pass = ellipseElement.isPointInStroke(mySVGPoint) == false;
+ resultString += ((pass) ? "PASS" : "FAIL") + " ellipse stroke does not contain point at (" + point.x + ", " + point.y + ")\n";
+ });
+
+ resultString += "Testing elementFromPoint\n";
ellipseElement.style.setProperty("pointer-events", "visibleFill"); // only capture events on the fill
pointsInEllipse.forEach( function(point) {
var pass = (ellipseElement == document.elementFromPoint(point.x, point.y));

Powered by Google App Engine
This is Rietveld 408576698