OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style type="text/css"> | 3 <style type="text/css"> |
4 .pass { color: green; } | 4 .pass { color: green; } |
5 .fail { color: red; } | 5 .fail { color: red; } |
6 </style> | 6 </style> |
7 <script> | 7 <script> |
8 function printOut(msg) | 8 function printOut(msg) |
9 { | 9 { |
10 var console = document.getElementById("console"); | 10 var console = document.getElementById("console"); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 attributes: [ | 78 attributes: [ |
79 {name: 'nodeValue', expectedNull: null}, | 79 {name: 'nodeValue', expectedNull: null}, |
80 // 'prefix' only works because this is an HTMLElement t
ype node, if it were an | 80 // 'prefix' only works because this is an HTMLElement t
ype node, if it were an |
81 // XML node (created using createElementNS()) this woul
d throw an exception. We | 81 // XML node (created using createElementNS()) this woul
d throw an exception. We |
82 // should test this further as Firefox has a different
behavior. | 82 // should test this further as Firefox has a different
behavior. |
83 {name: 'prefix', expectedNull: null}, | 83 {name: 'prefix', expectedNull: null}, |
84 {name: 'textContent', expectedNull: ''} | 84 {name: 'textContent', expectedNull: ''} |
85 ] | 85 ] |
86 }, | 86 }, |
87 { | 87 { |
| 88 type: 'Element', |
| 89 elementToUse: document.createElementNS('http://example.com/'
, 'example'), |
| 90 attributes: [ |
| 91 {name: 'id', expectedNull: ''}, |
| 92 {name: 'className', expectedNull: ''}, |
| 93 {name: 'innerHTML', expectedNull: ''}, |
| 94 {name: 'outerHTML', expectedNull: 'exception'} |
| 95 ] |
| 96 }, |
| 97 { |
88 type: 'HTMLElement', | 98 type: 'HTMLElement', |
89 elementToUse: document.createElement('div'), | 99 elementToUse: document.createElement('abbr'), |
90 attributes: [ | 100 attributes: [ |
91 {name: 'title', expectedNull: ''}, | 101 {name: 'accessKey', expectedNull: 'null'}, |
92 {name: 'id', expectedNull: ''}, | 102 {name: 'title', expectedNull: 'null'}, |
93 {name: 'lang', expectedNull: ''}, | 103 {name: 'lang', expectedNull: 'null'}, |
94 {name: 'dir', expectedNull: ''}, | 104 {name: 'dir', expectedNull: 'null'}, |
95 {name: 'className', expectedNull: ''}, | |
96 {name: 'innerHTML', expectedNull: ''}, | |
97 {name: 'innerText', expectedNull: ''}, | 105 {name: 'innerText', expectedNull: ''}, |
98 // FIXME: TEST THESE | 106 {name: 'outerText', expectedNull: 'exception'}, |
99 // {name: 'outerHTML', expectedNull: ''}, | |
100 // {name: 'outerText', expectedNull: ''}, | |
101 {name: 'contentEditable', expectedNull: 'exception'} | 107 {name: 'contentEditable', expectedNull: 'exception'} |
102 ] | 108 ] |
103 }, | 109 }, |
104 { | 110 { |
105 type: 'HTMLAnchorElement', | 111 type: 'HTMLAnchorElement', |
106 elementToUse: document.createElement('a'), | 112 elementToUse: document.createElement('a'), |
107 attributes: [ | 113 attributes: [ |
108 {name: 'accessKey', expectedNull: ''}, | |
109 {name: 'charset', expectedNull: 'null'}, | 114 {name: 'charset', expectedNull: 'null'}, |
110 {name: 'coords', expectedNull: 'null'}, | 115 {name: 'coords', expectedNull: 'null'}, |
111 {name: 'download', expectedNull: 'null'}, | 116 {name: 'download', expectedNull: 'null'}, |
112 {name: 'href', expectedNull: ''}, | 117 {name: 'href', expectedNull: ''}, |
113 {name: 'hreflang', expectedNull: 'null'}, | 118 {name: 'hreflang', expectedNull: 'null'}, |
114 {name: 'name', expectedNull: 'null'}, | 119 {name: 'name', expectedNull: 'null'}, |
115 {name: 'ping', expectedNull: 'null'}, | 120 {name: 'ping', expectedNull: 'null'}, |
116 {name: 'rel', expectedNull: 'null'}, | 121 {name: 'rel', expectedNull: 'null'}, |
117 {name: 'rev', expectedNull: 'null'}, | 122 {name: 'rev', expectedNull: 'null'}, |
118 {name: 'shape', expectedNull: 'null'}, | 123 {name: 'shape', expectedNull: 'null'}, |
(...skipping 13 matching lines...) Expand all Loading... |
132 {name: 'height', expectedNull: 'null'}, | 137 {name: 'height', expectedNull: 'null'}, |
133 {name: 'name', expectedNull: 'null'}, | 138 {name: 'name', expectedNull: 'null'}, |
134 {name: 'object', expectedNull: 'null', isUrl: true}, | 139 {name: 'object', expectedNull: 'null', isUrl: true}, |
135 {name: 'width', expectedNull: 'null'} | 140 {name: 'width', expectedNull: 'null'} |
136 ] | 141 ] |
137 }, | 142 }, |
138 { | 143 { |
139 type: 'HTMLAreaElement', | 144 type: 'HTMLAreaElement', |
140 elementToUse: document.createElement('area'), | 145 elementToUse: document.createElement('area'), |
141 attributes: [ | 146 attributes: [ |
142 {name: 'accessKey', expectedNull: ''}, | |
143 {name: 'alt', expectedNull: 'null'}, | 147 {name: 'alt', expectedNull: 'null'}, |
144 {name: 'coords', expectedNull: 'null'}, | 148 {name: 'coords', expectedNull: 'null'}, |
145 {name: 'href', expectedNull: ''}, | 149 {name: 'href', expectedNull: ''}, |
146 {name: 'ping', expectedNull: 'null'}, | 150 {name: 'ping', expectedNull: 'null'}, |
147 {name: 'shape', expectedNull: 'null'}, | 151 {name: 'shape', expectedNull: 'null'}, |
148 {name: 'target', expectedNull: 'null'} | 152 {name: 'target', expectedNull: 'null'} |
149 ] | 153 ] |
150 }, | 154 }, |
151 { | 155 { |
152 type: 'HTMLAudioElement', | 156 type: 'HTMLAudioElement', |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 type: 'HTMLBRElement', | 192 type: 'HTMLBRElement', |
189 elementToUse: document.createElement('br'), | 193 elementToUse: document.createElement('br'), |
190 attributes: [ | 194 attributes: [ |
191 {name: 'clear', expectedNull: 'null'} | 195 {name: 'clear', expectedNull: 'null'} |
192 ] | 196 ] |
193 }, | 197 }, |
194 { | 198 { |
195 type: 'HTMLButtonElement', | 199 type: 'HTMLButtonElement', |
196 elementToUse: document.createElement('button'), | 200 elementToUse: document.createElement('button'), |
197 attributes: [ | 201 attributes: [ |
198 {name: 'accessKey', expectedNull: ''}, | |
199 {name: 'formAction', expectedNull: 'null', isUrl: true}, | 202 {name: 'formAction', expectedNull: 'null', isUrl: true}, |
200 {name: 'formEnctype', expectedNull: 'application/x-www-f
orm-urlencoded'}, | 203 {name: 'formEnctype', expectedNull: 'application/x-www-f
orm-urlencoded'}, |
201 {name: 'formMethod', expectedNull: 'get'}, | 204 {name: 'formMethod', expectedNull: 'get'}, |
202 {name: 'formTarget', expectedNull: 'null'}, | 205 {name: 'formTarget', expectedNull: 'null'}, |
203 {name: 'name', expectedNull: 'null'}, | 206 {name: 'name', expectedNull: 'null'}, |
204 {name: 'type', expectedNull: 'submit'}, | 207 {name: 'type', expectedNull: 'submit'}, |
205 {name: 'value', expectedNull: 'null'} | 208 {name: 'value', expectedNull: 'null'} |
206 ] | 209 ] |
207 }, | 210 }, |
208 { | 211 { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 {name: 'src', expectedNull: 'null', isUrl: true}, | 348 {name: 'src', expectedNull: 'null', isUrl: true}, |
346 {name: 'srcset', expectedNull: 'null'}, | 349 {name: 'srcset', expectedNull: 'null'}, |
347 {name: 'useMap', expectedNull: 'null'} | 350 {name: 'useMap', expectedNull: 'null'} |
348 ] | 351 ] |
349 }, | 352 }, |
350 { | 353 { |
351 type: 'HTMLInputElement', | 354 type: 'HTMLInputElement', |
352 elementToUse: document.createElement('input'), | 355 elementToUse: document.createElement('input'), |
353 attributes: [ | 356 attributes: [ |
354 {name: 'accept', expectedNull: 'null'}, | 357 {name: 'accept', expectedNull: 'null'}, |
355 {name: 'accessKey', expectedNull: ''}, | |
356 {name: 'align', expectedNull: 'null'}, | 358 {name: 'align', expectedNull: 'null'}, |
357 {name: 'alt', expectedNull: 'null'}, | 359 {name: 'alt', expectedNull: 'null'}, |
358 {name: 'autocomplete', expectedNull: 'null'}, | 360 {name: 'autocomplete', expectedNull: 'null'}, |
359 {name: 'defaultValue', expectedNull: 'null'}, | 361 {name: 'defaultValue', expectedNull: 'null'}, |
360 {name: 'dirName', expectedNull: 'null'}, | 362 {name: 'dirName', expectedNull: 'null'}, |
361 {name: 'formAction', expectedNull: 'null', isUrl: true}, | 363 {name: 'formAction', expectedNull: 'null', isUrl: true}, |
362 {name: 'formEnctype', expectedNull: 'application/x-www-f
orm-urlencoded'}, | 364 {name: 'formEnctype', expectedNull: 'application/x-www-f
orm-urlencoded'}, |
363 {name: 'formMethod', expectedNull: 'get'}, | 365 {name: 'formMethod', expectedNull: 'get'}, |
364 {name: 'formTarget', expectedNull: 'null'}, | 366 {name: 'formTarget', expectedNull: 'null'}, |
365 {name: 'max', expectedNull: 'null'}, | 367 {name: 'max', expectedNull: 'null'}, |
(...skipping 25 matching lines...) Expand all Loading... |
391 attributes: [ | 393 attributes: [ |
392 {name: 'challenge', expectedNull: 'null'}, | 394 {name: 'challenge', expectedNull: 'null'}, |
393 {name: 'keytype', expectedNull: 'null'}, | 395 {name: 'keytype', expectedNull: 'null'}, |
394 {name: 'name', expectedNull: 'null'} | 396 {name: 'name', expectedNull: 'null'} |
395 ] | 397 ] |
396 }, | 398 }, |
397 { | 399 { |
398 type: 'HTMLLabelElement', | 400 type: 'HTMLLabelElement', |
399 elementToUse: document.createElement('label'), | 401 elementToUse: document.createElement('label'), |
400 attributes: [ | 402 attributes: [ |
401 {name: 'accessKey', expectedNull: ''}, | |
402 {name: 'htmlFor', expectedNull: 'null'} | 403 {name: 'htmlFor', expectedNull: 'null'} |
403 ] | 404 ] |
404 }, | 405 }, |
405 { | 406 { |
406 type: 'HTMLLegendElement', | 407 type: 'HTMLLegendElement', |
407 elementToUse: document.createElement('legend'), | 408 elementToUse: document.createElement('legend'), |
408 attributes: [ | 409 attributes: [ |
409 {name: 'accessKey', expectedNull: ''}, | |
410 {name: 'align', expectedNull: 'null'} | 410 {name: 'align', expectedNull: 'null'} |
411 ] | 411 ] |
412 }, | 412 }, |
413 { | 413 { |
414 type: 'HTMLLIElement', | 414 type: 'HTMLLIElement', |
415 elementToUse: document.createElement('li'), | 415 elementToUse: document.createElement('li'), |
416 attributes: [ | 416 attributes: [ |
417 {name: 'type', expectedNull: 'null'} | 417 {name: 'type', expectedNull: 'null'} |
418 ] | 418 ] |
419 }, | 419 }, |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 {name: 'align', expectedNull: 'null'}, | 657 {name: 'align', expectedNull: 'null'}, |
658 {name: 'ch', expectedNull: 'null'}, | 658 {name: 'ch', expectedNull: 'null'}, |
659 {name: 'chOff', expectedNull: 'null'}, | 659 {name: 'chOff', expectedNull: 'null'}, |
660 {name: 'vAlign', expectedNull: 'null'} | 660 {name: 'vAlign', expectedNull: 'null'} |
661 ] | 661 ] |
662 }, | 662 }, |
663 { | 663 { |
664 type: 'HTMLTextAreaElement', | 664 type: 'HTMLTextAreaElement', |
665 elementToUse: document.createElement('textarea'), | 665 elementToUse: document.createElement('textarea'), |
666 attributes: [ | 666 attributes: [ |
667 {name: 'accessKey', expectedNull: ''}, | |
668 {name: 'defaultValue', expectedNull: 'null'}, | 667 {name: 'defaultValue', expectedNull: 'null'}, |
669 {name: 'dirName', expectedNull: 'null'}, | 668 {name: 'dirName', expectedNull: 'null'}, |
670 {name: 'inputMode', expectedNull: 'null'}, | 669 {name: 'inputMode', expectedNull: 'null'}, |
671 {name: 'name', expectedNull: 'null'}, | 670 {name: 'name', expectedNull: 'null'}, |
672 {name: 'placeholder', expectedNull: 'null'}, | 671 {name: 'placeholder', expectedNull: 'null'}, |
673 {name: 'value', expectedNull: ''}, | 672 {name: 'value', expectedNull: ''}, |
674 {name: 'wrap', expectedNull: 'null'} | 673 {name: 'wrap', expectedNull: 'null'} |
675 ] | 674 ] |
676 }, | 675 }, |
677 { | 676 { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 printOut(''); | 719 printOut(''); |
721 } | 720 } |
722 } | 721 } |
723 </script> | 722 </script> |
724 </head> | 723 </head> |
725 <body onload="runTests()"> | 724 <body onload="runTests()"> |
726 <p>This test setting various attributes of a elements to JavaScript null.</p
> | 725 <p>This test setting various attributes of a elements to JavaScript null.</p
> |
727 <div id="console"></div> | 726 <div id="console"></div> |
728 </body> | 727 </body> |
729 </html> | 728 </html> |
OLD | NEW |