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

Side by Side Diff: LayoutTests/fast/events/press-enter-key-on-focused-element-inside-link.html

Issue 619613005: The link should be activated by enter key on focusing the child element inside the anchor(relanding) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 1 month 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
« no previous file with comments | « no previous file | LayoutTests/fast/events/press-enter-key-on-focused-element-inside-link-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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <a id="link" href="#" tabindex="-1" onclick="debug(eventInfo(event))">
4 <h1 tabindex="1" id="focus0"
5 onkeydown="debug(eventInfo(event))"
6 onkeypress="debug(eventInfo(event))"
7 onkeyup="debug(eventInfo(event))">EnterMe</h1>
8 <textarea tabindex="2" id="focus1"
9 onkeydown="debug(eventInfo(event))"
10 onkeypress="debug(eventInfo(event))"
11 onkeyup="debug(eventInfo(event))">TypeHere</textarea>
12 </a>
13 <svg width="200" height="50" onclick="debug(eventInfo(event))">
14 <a xlink:href="#">
15 <text font-size="18px" y="20" tabindex="3"
16 onkeydown="debug(eventInfo(event))"
17 onkeypress="debug(eventInfo(event))"
18 onkeyup="debug(eventInfo(event))">SVG anchor with tabindex</text>
19 </a>
20 </svg>
21 <div id="console"></div>
22 <script>
23 description('This test ensures that the link is activated by enter key on fo cusing the child element inside the anchor');
24 function eventInfo(event) {
25 if (event.type == 'keydown' || event.type == 'keypress' || event.type == 'keyup')
26 return event.keyIdentifier == 'U+0009' ? '' : event.target.tagName + ' - ' + event.type + ' - ' + event.keyIdentifier;
27 else if (event.type == 'click')
28 return event.target.tagName + ' - ' + event.type;
29 else
30 return 'unexpected event - ' + event.target.tagName + ' - ' + event. type;
31
32 }
33 for (var i = 0; i < 3; i++) {
34 if (window.eventSender) {
35 eventSender.keyDown('\t');
36 eventSender.keyDown('\n');
37 }
38 }
39
40 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/press-enter-key-on-focused-element-inside-link-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698