Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / features.html
blobe3c075707a81664a5e7d95b7d60adeffc47eb02f
1 <script>
3 function test() {
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 var undefined;
9 var features = [
10 ["Core", undefined],
11 ["HTML", undefined],
12 ["XML", undefined],
13 ["Views", undefined],
14 ["StyleSheets", undefined],
15 ["CSS", undefined],
16 ["CSS2", undefined],
17 ["CSS3", undefined],
18 ["Events", undefined],
19 ["UIEvents", undefined],
20 ["MouseEvents", undefined],
21 ["HTMLEvents", undefined],
22 ["MutationEvents", undefined],
23 ["Range", undefined],
24 ["Traversal", undefined],
26 ["Core", null],
27 ["HTML", null],
28 ["XML", null],
29 ["Views", null],
30 ["StyleSheets", null],
31 ["CSS", null],
32 ["CSS2", null],
33 ["CSS3", null],
34 ["Events", null],
35 ["UIEvents", null],
36 ["MouseEvents", null],
37 ["HTMLEvents", null],
38 ["MutationEvents", null],
39 ["Range", null],
40 ["Traversal", null],
42 ["Core", ""],
43 ["HTML", ""],
44 ["XML", ""],
45 ["Views", ""],
46 ["StyleSheets", ""],
47 ["CSS", ""],
48 ["CSS2", ""],
49 ["CSS3", ""],
50 ["Events", ""],
51 ["UIEvents", ""],
52 ["MouseEvents", ""],
53 ["HTMLEvents", ""],
54 ["MutationEvents", ""],
55 ["Range", ""],
56 ["Traversal", ""],
58 ["Core", "1.0"],
59 ["HTML", "1.0"],
60 ["XML", "1.0"],
61 ["Views", "1.0"],
62 ["StyleSheets", "1.0"],
63 ["CSS", "1.0"],
64 ["CSS2", "1.0"],
65 ["CSS3", "1.0"],
66 ["Events", "1.0"],
67 ["UIEvents", "1.0"],
68 ["MouseEvents", "1.0"],
69 ["HTMLEvents", "1.0"],
70 ["MutationEvents", "1.0"],
71 ["Range", "1.0"],
72 ["Traversal", "1.0"],
74 ["Core", "2.0"],
75 ["HTML", "2.0"],
76 ["XML", "2.0"],
77 ["Views", "2.0"],
78 ["StyleSheets", "2.0"],
79 ["CSS", "2.0"],
80 ["CSS2", "2.0"],
81 ["CSS3", "2.0"],
82 ["Events", "2.0"],
83 ["UIEvents", "2.0"],
84 ["MouseEvents", "2.0"],
85 ["HTMLEvents", "2.0"],
86 ["MutationEvents", "2.0"],
87 ["Range", "2.0"],
88 ["Traversal", "2.0"],
90 ["Core", "3.0"],
91 ["HTML", "3.0"],
92 ["XML", "3.0"],
93 ["Views", "3.0"],
94 ["StyleSheets", "3.0"],
95 ["CSS", "3.0"],
96 ["CSS2", "3.0"],
97 ["CSS3", "3.0"],
98 ["Events", "3.0"],
99 ["UIEvents", "3.0"],
100 ["MouseEvents", "3.0"],
101 ["HTMLEvents", "3.0"],
102 ["MutationEvents", "3.0"],
103 ["Range", "3.0"],
104 ["Traversal", "3.0"],
106 ["Core", "nonsense"],
107 ["HTML", "nonsense"],
108 ["XML", "nonsense"],
109 ["Views", "nonsense"],
110 ["StyleSheets", "nonsense"],
111 ["CSS", "nonsense"],
112 ["CSS2", "nonsense"],
113 ["CSS3", "nonsense"],
114 ["Events", "nonsense"],
115 ["UIEvents", "nonsense"],
116 ["MouseEvents", "nonsense"],
117 ["HTMLEvents", "nonsense"],
118 ["MutationEvents", "nonsense"],
119 ["Range", "nonsense"],
120 ["Traversal", "nonsense"],
122 [undefined, ""],
123 [undefined, "1.0"],
124 [undefined, "2.0"],
125 [undefined, "3.0"],
126 [undefined, "nonsense"],
127 [undefined, undefined],
128 [undefined, null],
130 [null, ""],
131 [null, "1.0"],
132 [null, "2.0"],
133 [null, "3.0"],
134 [null, "nonsense"],
135 [null, undefined],
136 [null, null],
138 ["nonsense", ""],
139 ["nonsense", "1.0"],
140 ["nonsense", "2.0"],
141 ["nonsense", "3.0"],
142 ["nonsense", "nonsense"],
143 ["nonsense", undefined],
144 ["nonsense", null],
147 for (var i = 0; i < features.length; ++i)
149 var item = features[i];
150 if (item[1] == "omitted")
151 var hasFeature = document.implementation.hasFeature(item[0]);
152 else
153 var hasFeature = document.implementation.hasFeature(item[0], item[1]);
155 var item0String = item[0];
156 if (typeof item0String == "string")
157 item0String = '"' + item0String + '"';
158 var item1String = item[1];
159 if (typeof item1String == "string" && item[1] != "omitted")
160 item1String = '"' + item1String + '"';
161 var message = item0String + ', ' + item1String + ': ' + hasFeature;
163 var div = document.createElement('div');
164 div.innerHTML = message;
165 document.body.appendChild(div);
169 </script>
171 <body onload="test()">
172 </body>