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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/dom/script-tests/path-totalLength.js

Issue 2413753004: Move getTotalLength and getPointAtLength methods from SVGPathElement to SVGGeometryElement. (Closed)
Patch Set: Align with review comments Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 description("This tests getTotalLength of SVG path.");
2
3 var pathElement = document.createElementNS("http://www.w3.org/2000/svg", "path") ;
4
5 function getTotalLength(string) {
6 pathElement.setAttributeNS(null, "d", string);
7
8 var point = pathElement.getTotalLength();
9 return point;
10 }
11
12 shouldBe("getTotalLength('M0,20 L400,20 L640,20')", "640");
13 shouldBe("getTotalLength('M0,20 L400,20 L640,20 z')", "1280");
14 shouldBe("getTotalLength('M0,20 L400,20 z M 320,20 L640,20')", "1120");
15
16 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698