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

Side by Side Diff: LayoutTests/editing/deleting/delete-by-word-002.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
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 28 matching lines...) Expand all
39 </div> 39 </div>
40 <script> 40 <script>
41 function sendDeleteWordKey() 41 function sendDeleteWordKey()
42 { 42 {
43 var deleteWordModifiers; 43 var deleteWordModifiers;
44 if (navigator.userAgent.search(/\bMac OS X\b/) != -1) 44 if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
45 deleteWordModifiers = ["altKey"]; 45 deleteWordModifiers = ["altKey"];
46 else 46 else
47 deleteWordModifiers = ["ctrlKey"]; 47 deleteWordModifiers = ["ctrlKey"];
48 if (window.eventSender) 48 if (window.eventSender)
49 eventSender.keyDown(String.fromCharCode(8), deleteWordModifiers); 49 eventSender.keyDown("backspace", deleteWordModifiers);
50 debugForDumpAsText("DeleteWord"); 50 debugForDumpAsText("DeleteWord");
51 } 51 }
52 52
53 function editingTest() 53 function editingTest()
54 { 54 {
55 moveSelectionForwardByWordCommand(); 55 moveSelectionForwardByWordCommand();
56 moveSelectionForwardByWordCommand(); 56 moveSelectionForwardByWordCommand();
57 sendDeleteWordKey(); 57 sendDeleteWordKey();
58 undoCommand(); 58 undoCommand();
59 } 59 }
60 60
61 runDumpAsTextEditingTest(true); 61 runDumpAsTextEditingTest(true);
62 </script> 62 </script>
63 </body> 63 </body>
64 </html> 64 </html>
OLDNEW
« no previous file with comments | « LayoutTests/editing/deleting/delete-by-word-001.html ('k') | LayoutTests/editing/deleting/delete-ligature-001.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698