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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 {name: 'name', expectedNull: 'null'}, | 344 {name: 'name', expectedNull: 'null'}, |
345 {name: 'src', expectedNull: 'null', isUrl: true}, | 345 {name: 'src', expectedNull: 'null', isUrl: true}, |
346 {name: 'srcset', expectedNull: 'null'}, | 346 {name: 'srcset', expectedNull: 'null'}, |
347 {name: 'useMap', expectedNull: 'null'} | 347 {name: 'useMap', expectedNull: 'null'} |
348 ] | 348 ] |
349 }, | 349 }, |
350 { | 350 { |
351 type: 'HTMLInputElement', | 351 type: 'HTMLInputElement', |
352 elementToUse: document.createElement('input'), | 352 elementToUse: document.createElement('input'), |
353 attributes: [ | 353 attributes: [ |
354 {name: 'accept', expectedNull: ''}, | 354 {name: 'accept', expectedNull: 'null'}, |
355 {name: 'accessKey', expectedNull: ''}, | 355 {name: 'accessKey', expectedNull: ''}, |
356 {name: 'align', expectedNull: ''}, | 356 {name: 'align', expectedNull: 'null'}, |
357 {name: 'alt', expectedNull: ''}, | 357 {name: 'alt', expectedNull: 'null'}, |
358 {name: 'defaultValue', expectedNull: ''}, | 358 {name: 'autocomplete', expectedNull: 'null'}, |
359 {name: 'name', expectedNull: ''}, | 359 {name: 'defaultValue', expectedNull: 'null'}, |
360 {name: 'src', expectedNull: ''}, | 360 {name: 'dirName', expectedNull: 'null'}, |
| 361 {name: 'formAction', expectedNull: 'null', isUrl: true}, |
| 362 {name: 'formEnctype', expectedNull: 'application/x-www-f
orm-urlencoded'}, |
| 363 {name: 'formMethod', expectedNull: 'get'}, |
| 364 {name: 'formTarget', expectedNull: 'null'}, |
| 365 {name: 'max', expectedNull: 'null'}, |
| 366 {name: 'min', expectedNull: 'null'}, |
| 367 {name: 'name', expectedNull: 'null'}, |
| 368 {name: 'pattern', expectedNull: 'null'}, |
| 369 {name: 'placeholder', expectedNull: 'null'}, |
| 370 {name: 'src', expectedNull: 'null', isUrl: true}, |
| 371 {name: 'step', expectedNull: 'null'}, |
361 {name: 'type', expectedNull: 'text'}, | 372 {name: 'type', expectedNull: 'text'}, |
362 {name: 'useMap', expectedNull: ''}, | 373 {name: 'useMap', expectedNull: 'null'} |
363 {name: 'value', expectedNull: ''}, | 374 ] |
| 375 }, |
| 376 // [TreatNullAs=NullString] is not identical to [TreatNullAs=Emp
tyString] because |
| 377 // null and empty string can be distinguished. A side-effect is
that setting |
| 378 // HTMLInputElement.value to null does clear the old value. This
would be fixed by |
| 379 // using [TreatNullAs=EmptyString], but until then test value se
parately to avoid |
| 380 // interference from the defaultValue test. |
| 381 { |
| 382 type: 'HTMLInputElement', |
| 383 elementToUse: document.createElement('input'), |
| 384 attributes: [ |
| 385 {name: 'value', expectedNull: ''} |
364 ] | 386 ] |
365 }, | 387 }, |
366 { | 388 { |
367 type: 'HTMLKeygenElement', | 389 type: 'HTMLKeygenElement', |
368 elementToUse: document.createElement('keygen'), | 390 elementToUse: document.createElement('keygen'), |
369 attributes: [ | 391 attributes: [ |
370 {name: 'challenge', expectedNull: 'null'}, | 392 {name: 'challenge', expectedNull: 'null'}, |
371 {name: 'keytype', expectedNull: 'null'}, | 393 {name: 'keytype', expectedNull: 'null'}, |
372 {name: 'name', expectedNull: 'null'} | 394 {name: 'name', expectedNull: 'null'} |
373 ] | 395 ] |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 printOut(''); | 703 printOut(''); |
682 } | 704 } |
683 } | 705 } |
684 </script> | 706 </script> |
685 </head> | 707 </head> |
686 <body onload="runTests()"> | 708 <body onload="runTests()"> |
687 <p>This test setting various attributes of a elements to JavaScript null.</p
> | 709 <p>This test setting various attributes of a elements to JavaScript null.</p
> |
688 <div id="console"></div> | 710 <div id="console"></div> |
689 </body> | 711 </body> |
690 </html> | 712 </html> |
OLD | NEW |