Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/html/tabindex-nonfocusable.html

Issue 2298133004: Changed the default value of tabIndex of <fieldset> and <output> to be -1 as they are non-focusable… (Closed)
Patch Set: Added a layout test Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
tkent 2016/09/01 23:27:24 Tests for tabIndex are put to LayoutTests/fast/eve
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_true(elm.tabIndex == 0);
tkent 2016/09/01 23:27:24 assert_equal(elm.tabIndex, 0)
lunalu1 2016/09/02 01:07:38 Done.
28 }, 'Default tabIndex value of tag' + tag + ' should be 0');
29 }
30
31 test(function() {
32 var elm = document.getElementById("output");
33 assert_true(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_true(elm.tabIndex == -1);
39 }, 'Default tabIndex value of tag FIELDSET should be -1');
40 </script>
41 </body>
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698