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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/frames/iframe-window-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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) 4 if (window.testRunner)
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 6
7 function moveFocus() { 7 function moveFocus() {
8 var ifrm = document.getElementById("rte"); 8 var ifrm = document.getElementById("rte");
9 ifrm.contentWindow.focus(); 9 ifrm.contentWindow.focus();
10 } 10 }
11 11
12 function init() { 12 function init() {
13 var ifrm = document.getElementById("rte"); 13 var ifrm = document.getElementById("rte");
14 ifrm.contentDocument.designMode = "on"; 14 ifrm.contentDocument.designMode = "on";
15 ifrm.contentWindow.focus(); 15 ifrm.contentWindow.focus();
16 16
17 if (window.testRunner) { 17 if (window.testRunner) {
18 eventSender.keyDown('T'); 18 eventSender.keyDown('T');
19 eventSender.keyDown('E'); 19 eventSender.keyDown('E');
20 eventSender.keyDown('S'); 20 eventSender.keyDown('S');
21 eventSender.keyDown('T'); 21 eventSender.keyDown('T');
22 22
23 // Click elsewhere to move the focus, and then move the focu s back 23 // Click elsewhere to move the focus, and then move the focu s back
24 eventSender.mouseMoveTo(10, 10); 24 eventSender.mouseMoveTo(10, 10);
25 eventSender.mouseDown(); 25 eventSender.mouseDown();
26 eventSender.mouseUp(); 26 eventSender.mouseUp();
27 27
28 // Newline character 28 // Newline character
29 eventSender.keyDown(String.fromCharCode(0x000a)); 29 eventSender.keyDown('Enter');
30 30
31 eventSender.keyDown('P'); 31 eventSender.keyDown('P');
32 eventSender.keyDown('A'); 32 eventSender.keyDown('A');
33 eventSender.keyDown('S'); 33 eventSender.keyDown('S');
34 eventSender.keyDown('S'); 34 eventSender.keyDown('S');
35 } 35 }
36 document.getElementById('res').innerHTML = ifrm.contentDocument. body.innerHTML; 36 document.getElementById('res').innerHTML = ifrm.contentDocument. body.innerHTML;
37 } 37 }
38 </script> 38 </script>
39 </head> 39 </head>
40 <body onload="init()"> 40 <body onload="init()">
41 <div id="dv" onclick="moveFocus()">This tests that focusing an editable iframe's window works correctly and allows text and newlines to be entered.<div> 41 <div id="dv" onclick="moveFocus()">This tests that focusing an editable iframe's window works correctly and allows text and newlines to be entered.<div>
42 <iframe id="rte" style="border: 1px solid black"></iframe> 42 <iframe id="rte" style="border: 1px solid black"></iframe>
43 <div id="res"></div> 43 <div id="res"></div>
44 </body> 44 </body>
45 </html> 45 </html>
46 46
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698