OLD | NEW |
---|---|
(Empty) | |
1 <!doctype html> | |
2 <title>SVGlength tests</title> | |
fs
2015/04/14 10:24:15
Could be more specific. Maybe something like: "SVG
Shanmuga Pandi
2015/04/14 10:41:37
Done.
| |
3 <script src=../../resources/testharness.js></script> | |
4 <script src=../../resources/testharnessreport.js></script> | |
5 <div id="testcontainer"> | |
fs
2015/04/14 10:24:15
Useful for?
Shanmuga Pandi
2015/04/14 10:41:37
Removed
| |
6 <svg width="1" height="1" visibility="hidden"> | |
fs
2015/04/14 10:24:15
These attributes doesn't seem useful for anything.
Shanmuga Pandi
2015/04/14 10:41:37
Removed unneeded attributes
| |
7 <linearGradient id="lg"/> | |
8 </svg> | |
9 </div> | |
10 <div id=log></div> | |
fs
2015/04/14 10:24:15
Not needed.
Shanmuga Pandi
2015/04/14 10:41:37
Acknowledged.
| |
11 <script> | |
12 function testLengthValue(result,expected, testcase) { | |
Erik Dahlström (inactive)
2015/04/14 09:27:46
nit: add a space after the comma
Shanmuga Pandi
2015/04/14 09:30:17
Done.
| |
13 test(function() { | |
14 assert_equals(result, expected); | |
15 }, testcase); | |
fs
2015/04/14 10:24:15
With a better <title> you might do: document.title
Shanmuga Pandi
2015/04/14 10:41:37
Done.
| |
16 } | |
17 | |
18 testLengthValue(document.querySelector("#lg").x1.baseVal.valueAsString, "0%", "l inearGradient.x1"); | |
fs
2015/04/14 10:24:15
Maybe first do:
var linearGradient = document.que
Shanmuga Pandi
2015/04/14 10:41:37
Done.
| |
19 testLengthValue(document.querySelector("#lg").x2.baseVal.valueAsString, "100%", "linearGradient.x2"); | |
20 testLengthValue(document.querySelector("#lg").y1.baseVal.valueAsString, "0%", "l inearGradient.y1"); | |
21 testLengthValue(document.querySelector("#lg").y2.baseVal.valueAsString, "0%", "l inearGradient.y2"); | |
22 </script> | |
OLD | NEW |