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

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

Issue 23496036: Make it possible to focus on 0-size form controls and anchors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/events/anchor-empty-focus-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script src="../js/resources/js-test-pre.js"></script>
4 function test() 4 </head>
5 { 5 <body onload="test()">
6 document.getElementById("anch").focus(); 6 <a id="anch" href="#"></a>
7 if (window.testRunner) { 7 <a id="anch2" href="#"></a>
8 testRunner.dumpAsText(); 8 <input>
9 eventSender.keyDown('s'); 9
10 } 10 <script>
11 } 11 description('This tests that focus() and sequential focus navigation work on emp ty anchors.');
12 </script> 12 jsTestIsAsync = true;
13 </head> 13 var emptyAnchor1 = document.getElementById("anch");
14 <body onload="test()"> 14 var emptyAnchor2 = document.getElementById("anch2");
15 This tests that focus() works on an empty anchor.<br> 15 function test() {
16 <a id="anch" href="#" onkeydown="document.getElementById('console').innerTex t = 'TEST PASSED'"></a> 16 emptyAnchor1.focus();
17 <br> 17 shouldBe('document.activeElement', 'emptyAnchor1');
18 <pre id="console">TEST FAILED</pre> 18
19 </body> 19 testRunner.overridePreference('WebKitTabToLinksPreferenceKey', true);
20 eventSender.keyDown('\t');
21 shouldBe('document.activeElement', 'emptyAnchor2');
22 finishJSTest();
23 }
24 </script>
25 <script src="../js/resources/js-test-post.js"></script>
26 </body>
20 </html> 27 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/anchor-empty-focus-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698