OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #test { d: path('M 0 0 H 30 V 40'); } |
| 6 </style> |
| 7 <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> |
| 8 <path id="test" d="M 10 190 H 190" /> |
| 9 </svg> |
| 10 <script> |
| 11 'use strict'; |
| 12 test(function() { |
| 13 var test = document.getElementById("test"); |
| 14 assert_equals(test.getTotalLength(), 70); |
| 15 }, "Test for getTotalLength using computed style"); |
| 16 test(function() { |
| 17 var test = document.getElementById("test"); |
| 18 assert_equals(test.getPointAtLength(70).x, 30); |
| 19 assert_equals(test.getPointAtLength(70).y, 40); |
| 20 }, "Test for getTotalLength using computed style"); |
| 21 test(function() { |
| 22 var test = document.getElementById("test"); |
| 23 assert_equals(test.getPathSegAtLength(50), 2); |
| 24 }, "Test for getPathSegAtLength using computed style"); |
| 25 </script> |
OLD | NEW |