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

Side by Side Diff: LayoutTests/fast/events/tab-focus-anchor-tab-to-links.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: Actually add new test 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5
6 function pass()
dmazzoni 2013/09/10 21:35:47 One last thing - since this is a new test it'd be
7 {
8 var el = document.querySelector('pre');
9 el.textContent += 'PASS\n';
10 }
11
12 function fail()
13 {
14 var el = document.querySelector('pre');
15 el.textContent += 'FAIL\n';
16 }
17
18 if (window.testRunner) {
19 testRunner.dumpAsText();
20 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true);
21 }
22
23 window.onload = function()
24 {
25 if (!window.testRunner)
26 return;
27
28 for (var i = 0; i < 3; i++) {
29 eventSender.keyDown('\t');
30 }
31 };
32
33 </script>
34 </head>
35 <body>
36
37 <p>This test ensures that we can tab to all anchor elements. Press tab three
38 times to focus the elements below.
39
40 <p><a onfocus="pass()" href="#">Focusable</a></p>
41 <p><a onfocus="fail()">Not focusable</a></p>
42 <p><a tabindex=0 onfocus="pass()" href="#">Focusable</a></p>
43 <p><a tabindex=0 onfocus="pass()">Focusable</a></p>
44 <p><input onfocus="fail()"></p>
45
46 <p>Result
47
48 <pre id="out"></pre>
49
50 </body>
51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698