| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <a id="a"></a> |
| 6 <input type="hidden" id="input-hidden"></input> |
| 7 <input disabled id="input-disabled"></input> |
| 8 <select disabled id="select-disabled"></select> |
| 9 <textarea disabled id="textarea-disabled"></textarea> |
| 10 <button disabled id="button-disabled"></button> |
| 11 <fieldset id="fieldset"><output id="output"></output></fieldset> |
| 12 <script> |
| 13 var idTagList = [ |
| 14 {id:"a", tag:"HYPERLINK <a> without href"}, |
| 15 {id:"input-hidden", tag:"INPUT[type=hidden]"}, |
| 16 {id:"input-disabled", tag:"INPUT[disabled]"}, |
| 17 {id:"select-disabled", tag:"SELECT[disabled]"}, |
| 18 {id:"textarea-disabled", tag:"TEXTAREA[disabled]"}, |
| 19 {id:"button-disabled", tag:"BUTTON[disabled]"}, |
| 20 ]; |
| 21 |
| 22 for (var idTag of idTagList) { |
| 23 var id = idTag.id; |
| 24 var tag = idTag.tag; |
| 25 test(function() { |
| 26 var elm = document.getElementById(id); |
| 27 assert_equals(elm.tabIndex, 0); |
| 28 }, 'Default tabIndex value of tag' + tag + ' should be 0'); |
| 29 } |
| 30 |
| 31 test(function() { |
| 32 var elm = document.getElementById("output"); |
| 33 assert_equals(elm.tabIndex, -1); |
| 34 }, 'Default tabIndex value of tag OUTPUT should be -1'); |
| 35 |
| 36 test(function() { |
| 37 var elm = document.getElementById("fieldset"); |
| 38 assert_equals(elm.tabIndex, -1); |
| 39 }, 'Default tabIndex value of tag FIELDSET should be -1'); |
| 40 </script> |
| 41 </body> |
| 42 |
| OLD | NEW |