| Index: third_party/WebKit/LayoutTests/fast/html/tabindex-nonfocusable.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/html/tabindex-nonfocusable.html b/third_party/WebKit/LayoutTests/fast/html/tabindex-nonfocusable.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2d7215ad633bc6cca8250e2749ba9b5da45fe014
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/html/tabindex-nonfocusable.html
|
| @@ -0,0 +1,42 @@
|
| +<!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>
|
| +
|
|
|