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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/menu-key-context-menu-reveal-focus.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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 <title>ContextMenu Key: Reveal Focused Element</title> 2 <title>ContextMenu Key: Reveal Focused Element</title>
3 <script src="../../resources/testharness.js"></script> 3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script> 4 <script src="../../resources/testharnessreport.js"></script>
5 <style> 5 <style>
6 body { 6 body {
7 height: 3000px; 7 height: 3000px;
8 } 8 }
9 </style> 9 </style>
10 <input type="text" id="txt"> 10 <input type="text" id="txt">
11 <a href="#" id="anchor">Anchor</a> 11 <a href="#" id="anchor">Anchor</a>
12 <script> 12 <script>
13 test(function() { 13 test(function() {
14 if (!window.eventSender) { 14 if (!window.eventSender) {
15 document.write('This test requires eventSender'); 15 document.write('This test requires eventSender');
16 return; 16 return;
17 } 17 }
18 document.getElementById('txt').focus(); 18 document.getElementById('txt').focus();
19 document.scrollingElement.scrollTop = 3000; 19 document.scrollingElement.scrollTop = 3000;
20 assert_not_equals(document.scrollingElement.scrollTop, 0); 20 assert_not_equals(document.scrollingElement.scrollTop, 0);
21 eventSender.keyDown("menu"); 21 eventSender.keyDown("ContextMenu");
22 assert_equals(document.scrollingElement.scrollTop, 0); 22 assert_equals(document.scrollingElement.scrollTop, 0);
23 }, 'Testing ContextMenu key should reveal focused input.'); 23 }, 'Testing ContextMenu key should reveal focused input.');
24 24
25 test(function() { 25 test(function() {
26 if (!window.eventSender) { 26 if (!window.eventSender) {
27 document.write('This test requires eventSender'); 27 document.write('This test requires eventSender');
28 return; 28 return;
29 } 29 }
30 document.getElementById('anchor').focus(); 30 document.getElementById('anchor').focus();
31 document.scrollingElement.scrollTop = 3000; 31 document.scrollingElement.scrollTop = 3000;
32 assert_not_equals(document.scrollingElement.scrollTop, 0); 32 assert_not_equals(document.scrollingElement.scrollTop, 0);
33 eventSender.keyDown("menu"); 33 eventSender.keyDown("ContextMenu");
34 assert_equals(document.scrollingElement.scrollTop, 0); 34 assert_equals(document.scrollingElement.scrollTop, 0);
35 }, 'Testing ContextMenu key should reveal focused anchor.'); 35 }, 'Testing ContextMenu key should reveal focused anchor.');
36 </script> 36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698