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

Side by Side Diff: LayoutTests/fast/events/tab-focus-anchor.html

Issue 15238002: Disallow tabsToLinks setting to prevent tabbing to anchor with tabIndex. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: And update expected result after removing accidentally added line Created 7 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 5
6 function pass() 6 function pass()
7 { 7 {
8 var el = document.querySelector('pre'); 8 var el = document.querySelector('pre');
9 el.textContent = 'PASS'; 9 el.textContent += 'PASS\n';
10 } 10 }
11 11
12 function fail() 12 function fail()
13 { 13 {
14 var el = document.querySelector('pre'); 14 var el = document.querySelector('pre');
15 el.textContent = 'FAIL'; 15 el.textContent += 'FAIL\n';
16 } 16 }
17 17
18 if (window.testRunner) { 18 if (window.testRunner) {
19 testRunner.dumpAsText(); 19 testRunner.dumpAsText();
20 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', false); 20 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', false);
21 } 21 }
22 22
23 window.onload = function() 23 window.onload = function()
24 { 24 {
25 if (!window.testRunner) 25 if (!window.testRunner)
26 return; 26 return;
27 27
28 for (var i = 0; i < 1; i++) { 28 for (var i = 0; i < 2; i++) {
29 eventSender.keyDown('\t'); 29 eventSender.keyDown('\t');
30 } 30 }
31 }; 31 };
32 32
33 </script> 33 </script>
34 </head> 34 </head>
35 <body> 35 <body>
36 36
37 <p>This test ensures that we can tab to an a element with a tab index. Press tab 37 <p>This test ensures that we can tab to an a element with a tab index. Press tab
38 to focus the element below. 38 to focus the element below.
39 39
40 <p><a tabindex=0 onfocus="fail()" href="#">Not focusable (given the WebKitTabToL inks pref is set to false)</a> 40 <p><a onfocus="fail()" href="#">Not focusable (given the WebKitTabToLinks pref i s set to false)</a>
41 <p><a onfocus="fail()">Not focusable</a>
42 <p><a tabindex=0 onfocus="pass()" href="#">Focusable</a>
41 <p><a tabindex=0 onfocus="pass()">Focusable</a> 43 <p><a tabindex=0 onfocus="pass()">Focusable</a>
42 44
43 <p>Result 45 <p>Result
44 46
45 <pre>FAIL</pre> 47 <pre id="out"></pre>
46 48
47 </body> 49 </body>
48 </html> 50 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/frame-tab-focus-expected.txt ('k') | LayoutTests/fast/events/tab-focus-anchor-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698