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

Side by Side Diff: LayoutTests/fast/events/keydown-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: Created 6 years, 2 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>
robwu 2014/10/13 09:19:48 This file should be renamed to "keypress-enter....
Miyoung Shin(g) 2014/10/13 11:05:01 Oh, right, I will change it
2 <script src="../../resources/js-test.js"></script>
3 <a id="link" href="#" tabindex="-1" onclick="checkKeyEvent(event)">
4 <h1 tabindex="1">EnterMe</h1>
5 </a>
6 <div id="console"></div>
7 <script>
8 description("This test ensures that the link is activated by enter key on fo cusing the child element inside the anchor");
9
10 var i = 0;
11 function test() {
12 if (window.eventSender)
13 eventSender.keyDown('\t');
14 var event = document.createEvent("KeyboardEvents");
15 event.initKeyboardEvent("keypress", true, true, window, "Enter", 0, 0, 0 , 0, 0, false);
16 document.activeElement.dispatchEvent(event);
robwu 2014/10/13 09:19:48 You should also be simulating the keydown/keyup ev
Miyoung Shin(g) 2014/10/13 11:05:01 OK. I will add keydown/keyup as well
robwu 2014/10/13 11:29:32 The test code in the following files suggest that
17 }
18 function checkKeyEvent(event) {
19 debug("PASS : [" + document.activeElement.localName + "], link is activa ted")
20 }
21 test();
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698