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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/dispatch-synthetic-keyboardevent-no-action.html

Issue 2045603002: Handle the "key" field as opposed to keyIdentifier field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos Created 4 years, 6 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 <script src="../../resources/js-test.js"></script> 2 <script src="../../resources/js-test.js"></script>
3 <p id="description"></p> 3 <p id="description"></p>
4 <form> 4 <form>
5 <input type="radio" id="radio1" name="foo" value="A" checked/> 5 <input type="radio" id="radio1" name="foo" value="A" checked/>
6 <input type="radio" id="radio2" name="foo" value="B" /> 6 <input type="radio" id="radio2" name="foo" value="B" />
7 </form> 7 </form>
8 <pre id="console"></pre> 8 <pre id="console"></pre>
9 <script> 9 <script>
10 description("Tests to ensure that default action does not occur for untrusted ev ents."); 10 description("Tests to ensure that default action does not occur for untrusted ev ents.");
11 11
12 var node = document.getElementById('radio1'); 12 var node = document.getElementById('radio1');
13 node.getBoundingClientRect(); 13 node.getBoundingClientRect();
14 14
15 var event = new KeyboardEvent('keydown', { keyIdentifier: 'Down' } ); 15 var event = new KeyboardEvent('keydown', { key: 'ArrowDown' } );
16 node.dispatchEvent(event); 16 node.dispatchEvent(event);
17 shouldBeTrue("document.getElementById('radio1').checked"); 17 shouldBeTrue("document.getElementById('radio1').checked");
18 shouldBeFalse("document.getElementById('radio2').checked"); 18 shouldBeFalse("document.getElementById('radio2').checked");
19 </script> 19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698