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/forms/fieldset/legend-focus.html

Issue 1528823002: Move tests related to <fieldset> and <legend> to fast/forms/fieldset. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <div id="log"></div> 3 <div id="log"></div>
4 <script src="../../../resources/testharness.js"></script> 4 <script src="../../../resources/testharness.js"></script>
5 <script src="../../../resources/testharnessreport.js"></script> 5 <script src="../../../resources/testharnessreport.js"></script>
6 6
7 <fieldset> 7 <fieldset>
8 <legend id="legend1">Legend</legend> 8 <legend id="legend1">Legend</legend>
9 <input> 9 <input>
10 </fieldset> 10 </fieldset>
11 11
12 <fieldset> 12 <fieldset>
13 <legend id="legend2" tabindex=10>Legend</legend> 13 <legend id="legend2" tabindex=10>Legend</legend>
14 <input> 14 <input>
15 </fieldset> 15 </fieldset>
16 16
17 <script> 17 <script>
18 test(function() { 18 test(function() {
19 document.getElementById('legend1').focus(); 19 document.getElementById('legend1').focus();
20 assert_equals(document.activeElement.tagName, 'INPUT'); 20 assert_equals(document.activeElement.tagName, 'INPUT');
21 }, 'focus() for non-focusable LEGEND element delegates focus to the first contro l in the owner FIELDSET.'); 21 }, 'focus() for non-focusable LEGEND element delegates focus to the first contro l in the owner FIELDSET.');
22 22
23 test(function() { 23 test(function() {
24 document.getElementById('legend2').focus(); 24 document.getElementById('legend2').focus();
25 assert_equals(document.activeElement.tagName, 'LEGEND'); 25 assert_equals(document.activeElement.tagName, 'LEGEND');
26 }, 'focus() for focusable LEGEND should not delgates focus.'); 26 }, 'focus() for focusable LEGEND should not delgates focus.');
27 </script> 27 </script>
28 </body> 28 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698