LayoutTests:
[WebKit-https.git] / LayoutTests / editing / deleting / delete-by-word-002.html
1 <html> 
2 <head>
3
4 <style>
5 .editing { 
6     border: 2px solid red; 
7     font-size: 24px; 
8 }
9 .explanation { 
10     border: 2px solid blue; 
11     padding: 12px; 
12     font-size: 24px; 
13     margin-bottom: 24px;
14 }
15 .scenario { margin-bottom: 16px;}
16 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
17 .expected-results:first-line { font-weight: bold }
18 </style>
19 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
20
21 <script>
22
23 function editingTest() {
24     moveSelectionForwardByWordCommand();
25     moveSelectionForwardByWordCommand();
26         if (window.eventSender)
27                 eventSender.keyDown(String.fromCharCode(127), ["altKey"]);
28         undoCommand();
29 }
30
31 </script>
32
33 <title>Editing Test</title> 
34 </head> 
35 <body>
36
37 <div class="explanation">
38 <div class="scenario">
39 Tests: 
40 <br>
41 Option-delete when no typing command is open, then undo.
42 </div>
43 <div class="expected-results">
44 Expected Results:
45 <br>
46 It should like this, with the word "two" selected:
47 <BR>
48 one two three four
49 </div>
50 </div>
51
52 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
53 <div id="test" class="editing">one two three four</div>
54 </div>
55
56 <script>
57 runEditingTest();
58 </script>
59
60 </body>
61 </html>