| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>SVG*List array method tests</title> | 2 <title>SVG*List array method tests</title> |
| 3 <script src=../../resources/testharness.js></script> | 3 <script src=../../resources/testharness.js></script> |
| 4 <script src=../../resources/testharnessreport.js></script> | 4 <script src=../../resources/testharnessreport.js></script> |
| 5 <div id="testcontainer"></div> | 5 <div id="testcontainer"></div> |
| 6 <div id=log></div> | 6 <div id=log></div> |
| 7 <script> | 7 <script> |
| 8 function createSvg() { | 8 function createSvg() { |
| 9 document.getElementById("testcontainer").innerHTML = '<svg id="svg" width="1"
height="1" visibility="hidden"><polygon id="polygon" points="10 10 450 212 24 10
3 45 32 62 42 123 52 62 52 57 72 12 548 85 12" visibility="hidden" systemLanguag
e="sv, en, fr, de, zn, jp"/><path id="path" d="M 10 10 L 450 212 24 103 45 32 62
42 123 52 62 52 57 72 12 548 85 12" transform="scale(0.5) rotate(34) translate(
10 10)" visibility="hidden"/><text id="text" dx="10 10 450 212 24 103 45 32 62 4
2 123 52 62 52 57 72 12 548 85 12" rotate="10 66 2 23 546 54657 567 546 3 2 2 2
23" visibility="hidden"/></svg>'; | 9 document.getElementById("testcontainer").innerHTML = '<svg id="svg" width="1"
height="1" visibility="hidden"><polygon id="polygon" points="10 10 450 212 24 10
3 45 32 62 42 123 52 62 52 57 72 12 548 85 12" visibility="hidden" systemLanguag
e="sv, en, fr, de, zn, jp"/><path id="path" d="M 10 10 L 450 212 24 103 45 32 62
42 123 52 62 52 57 72 12 548 85 12" transform="scale(0.5) rotate(34) translate(
10 10)" visibility="hidden"/><text id="text" dx="10 10 450 212 24 103 45 32 62 4
2 123 52 62 52 57 72 12 548 85 12" rotate="10 66 2 23 546 54657 567 546 3 2 2 2
23" visibility="hidden"/></svg>'; |
| 10 } | 10 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 "type": "SVGTransform", | 78 "type": "SVGTransform", |
| 79 "length": 3, | 79 "length": 3, |
| 80 "insert_value": createSVGTransformTranslate(5,5), | 80 "insert_value": createSVGTransformTranslate(5,5), |
| 81 "equals": function(a,b) { return a.matrix.a == b.matrix.a && | 81 "equals": function(a,b) { return a.matrix.a == b.matrix.a && |
| 82 a.matrix.b == b.matrix.b && | 82 a.matrix.b == b.matrix.b && |
| 83 a.matrix.c == b.matrix.c && | 83 a.matrix.c == b.matrix.c && |
| 84 a.matrix.d == b.matrix.d && | 84 a.matrix.d == b.matrix.d && |
| 85 a.matrix.e == b.matrix.e && | 85 a.matrix.e == b.matrix.e && |
| 86 a.matrix.f == b.matrix.f; } | 86 a.matrix.f == b.matrix.f; } |
| 87 }, | 87 }, |
| 88 "SVGPathSegList": | |
| 89 { "impl": path.pathSegList, | |
| 90 "type": "SVGPathSegMovetoAbs", | |
| 91 "length": 10, | |
| 92 "insert_value": path.createSVGPathSegMovetoAbs(5,5), | |
| 93 "equals": function(a,b) { return a.x == b.x && a.y == b.y; } | |
| 94 }, | |
| 95 "SVGLengthList": | 88 "SVGLengthList": |
| 96 { "impl": text.dx.baseVal, | 89 { "impl": text.dx.baseVal, |
| 97 "type": "SVGLength", | 90 "type": "SVGLength", |
| 98 "length": 20, | 91 "length": 20, |
| 99 "insert_value": createSVGLength(5), | 92 "insert_value": createSVGLength(5), |
| 100 "equals": function(a,b) { return a.valueInSpecifiedUnits == b.valueInS
pecifiedUnits && | 93 "equals": function(a,b) { return a.valueInSpecifiedUnits == b.valueInS
pecifiedUnits && |
| 101 a.unitType == b.unitType; } | 94 a.unitType == b.unitType; } |
| 102 }, | 95 }, |
| 103 "SVGNumberList": | 96 "SVGNumberList": |
| 104 { "impl": text.rotate.baseVal, | 97 { "impl": text.rotate.baseVal, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 127 var old_value = lists[list_type].impl[0]; | 120 var old_value = lists[list_type].impl[0]; |
| 128 var new_value = lists[list_type].insert_value; | 121 var new_value = lists[list_type].insert_value; |
| 129 lists[list_type].impl[0] = lists[list_type].insert_value; | 122 lists[list_type].impl[0] = lists[list_type].insert_value; |
| 130 assert_false(lists[list_type].equals(old_value, new_value)); | 123 assert_false(lists[list_type].equals(old_value, new_value)); |
| 131 assert_true(lists[list_type].equals(lists[list_type].impl[0], new_value)
); | 124 assert_true(lists[list_type].equals(lists[list_type].impl[0], new_value)
); |
| 132 assert_equals(lists[list_type].impl.length, lists[list_type].length); | 125 assert_equals(lists[list_type].impl.length, lists[list_type].length); |
| 133 }, list_type + " has array setter"); | 126 }, list_type + " has array setter"); |
| 134 } | 127 } |
| 135 | 128 |
| 136 </script> | 129 </script> |
| OLD | NEW |