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

Unified Diff: third_party/WebKit/LayoutTests/svg/dom/SVGGeometryElement-valid-arguments.html

Issue 2413753004: Move getTotalLength and getPointAtLength methods from SVGPathElement to SVGGeometryElement. (Closed)
Patch Set: Align with review comments Created 4 years, 2 months 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: third_party/WebKit/LayoutTests/svg/dom/SVGGeometryElement-valid-arguments.html
diff --git a/third_party/WebKit/LayoutTests/svg/dom/SVGGeometryElement-valid-arguments.html b/third_party/WebKit/LayoutTests/svg/dom/SVGGeometryElement-valid-arguments.html
new file mode 100644
index 0000000000000000000000000000000000000000..76fb2f49a09656d59544a794cb476a1787974f62
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/dom/SVGGeometryElement-valid-arguments.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>Check invalid arguments of SVGGeometryElement methods</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script>
+test(function() {
+ var pathElement = document.createElementNS("http://www.w3.org/2000/svg","path");
+
+ assert_throws(new TypeError(), function() { pathElement.getPointAtLength(); });
+ assert_throws(new TypeError(), function() { pathElement.getPointAtLength(NaN); });
+ assert_throws(new TypeError(), function() { pathElement.getPointAtLength(Infinity); });
+
+ assert_throws(new TypeError(), function() { pathElement.getPathSegAtLength(); });
+ assert_throws(new TypeError(), function() { pathElement.getPathSegAtLength(NaN); });
+ assert_throws(new TypeError(), function() { pathElement.getPathSegAtLength(Infinity); });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698