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

Unified Diff: third_party/WebKit/LayoutTests/svg/css/path-element.html

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DECLARE_VIRTUAL_TRACE Created 5 years 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/css/path-element.html
diff --git a/third_party/WebKit/LayoutTests/svg/css/path-element.html b/third_party/WebKit/LayoutTests/svg/css/path-element.html
new file mode 100644
index 0000000000000000000000000000000000000000..ba6b8b26d62b8d06de3f4c2d9b3190f2c6250e7d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/svg/css/path-element.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<style>
+#test { d: path('M 0 0 H 30 V 40'); }
+</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
+ <path id="test" d="M 10 190 H 190" />
+</svg>
+<script>
+'use strict';
+test(function() {
+ var test = document.getElementById("test");
+ assert_equals(test.getTotalLength(), 70);
+}, "Test for getTotalLength using computed style");
+test(function() {
+ var test = document.getElementById("test");
+ assert_equals(test.getPointAtLength(70).x, 30);
+ assert_equals(test.getPointAtLength(70).y, 40);
+}, "Test for getTotalLength using computed style");
+test(function() {
+ var test = document.getElementById("test");
+ assert_equals(test.getPathSegAtLength(50), 2);
+}, "Test for getPathSegAtLength using computed style");
+</script>

Powered by Google App Engine
This is Rietveld 408576698