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

Side by Side Diff: LayoutTests/editing/deleting/delete-by-word-001.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 years, 4 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
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/delete-by-word-002.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 .editing { 5 .editing {
6 border: 2px solid red; 6 border: 2px solid red;
7 font-size: 24px; 7 font-size: 24px;
8 } 8 }
9 .explanation { 9 .explanation {
10 border: 2px solid blue; 10 border: 2px solid blue;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 internals.settings.setEditingBehavior("mac"); 45 internals.settings.setEditingBehavior("mac");
46 46
47 function sendDeleteWordKey() 47 function sendDeleteWordKey()
48 { 48 {
49 var deleteWordModifiers; 49 var deleteWordModifiers;
50 if (navigator.userAgent.search(/\bMac OS X\b/) != -1) 50 if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
51 deleteWordModifiers = ["altKey"]; 51 deleteWordModifiers = ["altKey"];
52 else 52 else
53 deleteWordModifiers = ["ctrlKey"]; 53 deleteWordModifiers = ["ctrlKey"];
54 if (window.eventSender) 54 if (window.eventSender)
55 eventSender.keyDown(String.fromCharCode(8), deleteWordModifiers); 55 eventSender.keyDown("backspace", deleteWordModifiers);
56 debugForDumpAsText("DeleteWord"); 56 debugForDumpAsText("DeleteWord");
57 } 57 }
58 58
59 function editingTest() 59 function editingTest()
60 { 60 {
61 moveSelectionForwardByWordCommand(); 61 moveSelectionForwardByWordCommand();
62 moveSelectionForwardByWordCommand(); 62 moveSelectionForwardByWordCommand();
63 typeCharacterCommand(' '); 63 typeCharacterCommand(' ');
64 typeCharacterCommand('a'); 64 typeCharacterCommand('a');
65 typeCharacterCommand('b'); 65 typeCharacterCommand('b');
66 typeCharacterCommand('c'); 66 typeCharacterCommand('c');
67 sendDeleteWordKey(); 67 sendDeleteWordKey();
68 typeCharacterCommand('c'); 68 typeCharacterCommand('c');
69 typeCharacterCommand('h'); 69 typeCharacterCommand('h');
70 typeCharacterCommand('a'); 70 typeCharacterCommand('a');
71 } 71 }
72 72
73 runDumpAsTextEditingTest(true); 73 runDumpAsTextEditingTest(true);
74 </script> 74 </script>
75 </body> 75 </body>
76 </html> 76 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/delete-by-word-002.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698