OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <meta charset=utf-8> | 2 <meta charset=utf-8> |
3 <title>DOMImplementation.hasFeature(feature, version)</title> | 3 <title>DOMImplementation.hasFeature(feature, version)</title> |
4 <link rel=help href="https://dom.spec.whatwg.org/#dom-domimplementation-hasfeatu
re"> | 4 <link rel=help href="https://dom.spec.whatwg.org/#dom-domimplementation-hasfeatu
re"> |
5 <script src="/resources/testharness.js"></script> | 5 <script src="/resources/testharness.js"></script> |
6 <script src="/resources/testharnessreport.js"></script> | 6 <script src="/resources/testharnessreport.js"></script> |
7 <div id="log"></div> | 7 <div id="log"></div> |
8 <script> | 8 <script> |
9 test(function() { | 9 test(function() { |
10 var tests = [ | 10 var tests = [ |
11 [], | |
12 ["Core"], | |
13 ["XML"], | |
14 ["org.w3c.svg"], | |
15 ["org.w3c.dom.svg"], | |
16 ["http://www.w3.org/TR/SVG11/feature#Script"], | |
17 ["Core", "1.0"], | 11 ["Core", "1.0"], |
18 ["Core", "2.0"], | 12 ["Core", "2.0"], |
19 ["Core", "3.0"], | 13 ["Core", "3.0"], |
20 ["Core", "100.0"], | 14 ["Core", "100.0"], |
21 ["XML", "1.0"], | 15 ["XML", "1.0"], |
22 ["XML", "2.0"], | 16 ["XML", "2.0"], |
23 ["XML", "3.0"], | 17 ["XML", "3.0"], |
24 ["XML", "100.0"], | 18 ["XML", "100.0"], |
25 ["Core", "1"], | 19 ["Core", "1"], |
26 ["Core", "2"], | 20 ["Core", "2"], |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 ["aXML", null], | 124 ["aXML", null], |
131 ["Corea", null], | 125 ["Corea", null], |
132 ["XMLa", null], | 126 ["XMLa", null], |
133 ["Coare", null], | 127 ["Coare", null], |
134 ["XMaL", null], | 128 ["XMaL", null], |
135 ["Core", undefined], | 129 ["Core", undefined], |
136 ["XML", undefined], | 130 ["XML", undefined], |
137 ["This is filler text.", ""], | 131 ["This is filler text.", ""], |
138 [null, ""], | 132 [null, ""], |
139 [undefined, ""], | 133 [undefined, ""], |
140 ["org.w3c.svg", ""], | |
141 ["org.w3c.svg", "1.0"], | |
142 ["org.w3c.svg", "1.1"], | |
143 ["org.w3c.dom.svg", ""], | |
144 ["org.w3c.dom.svg", "1.0"], | |
145 ["org.w3c.dom.svg", "1.1"], | |
146 ["http://www.w3.org/TR/SVG11/feature#Script", "7.5"], | |
147 ]; | 134 ]; |
148 tests.forEach(function(data) { | 135 tests.forEach(function(data) { |
149 test(function() { | 136 test(function() { |
150 assert_equals(document.implementation.hasFeature | 137 assert_equals(document.implementation.hasFeature(data[0], data[1]), true) |
151 .apply(document.implementation, data), true) | 138 }, "hasFeature(" + format_value(data[0]) + ", " + format_value(data[1]) + ")
") |
152 }, "hasFeature(" + data.map(format_value).join(", ") + ")") | |
153 }) | 139 }) |
154 }) | 140 }) |
155 </script> | 141 </script> |
OLD | NEW |