chromium/third_party/blink/web_tests/fast/html/tabindex-nonfocusable.html

<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
  <a id="a"></a>
  <input type="hidden" id="input-hidden"></input>
  <input disabled id="input-disabled"></input>
  <select disabled id="select-disabled"></select>
  <textarea disabled id="textarea-disabled"></textarea>
  <button disabled id="button-disabled"></button>
  <fieldset id="fieldset"><output id="output"></output></fieldset>
  <script>
  var idTagList = [
      {id:"a", tag:"HYPERLINK <a> without href"},
      {id:"input-hidden", tag:"INPUT[type=hidden]"},
      {id:"input-disabled", tag:"INPUT[disabled]"},
      {id:"select-disabled", tag:"SELECT[disabled]"},
      {id:"textarea-disabled", tag:"TEXTAREA[disabled]"},
      {id:"button-disabled", tag:"BUTTON[disabled]"},
  ];

  for (var idTag of idTagList) {
    var id = idTag.id;
    var tag = idTag.tag;
    test(function() {
      var elm = document.getElementById(id);
      assert_equals(elm.tabIndex, 0);
    }, 'Default tabIndex value of tag' + tag + ' should be 0');
  }

  test(function() {
    var elm = document.getElementById("output");
    assert_equals(elm.tabIndex, -1);
  }, 'Default tabIndex value of tag OUTPUT should be -1');

  test(function() {
    var elm = document.getElementById("fieldset");
    assert_equals(elm.tabIndex, -1);
  }, 'Default tabIndex value of tag FIELDSET should be -1');
  </script>
</body>