LayoutTests:
[WebKit-https.git] / LayoutTests / editing / deleting / delete-by-word-001.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     typeCharacterCommand(' ');
27     typeCharacterCommand('a');
28     typeCharacterCommand('b');
29     typeCharacterCommand('c');
30         if (window.eventSender)
31                 eventSender.keyDown(String.fromCharCode(127), ["altKey"]);
32     typeCharacterCommand('c');
33     typeCharacterCommand('h');
34     typeCharacterCommand('a');
35 }
36
37 </script>
38
39 <title>Editing Test</title> 
40 </head> 
41 <body>
42
43 <div class="explanation">
44 <div class="scenario">
45 Tests: 
46 <br>
47 Option-delete when a typing command is open.
48 </div>
49 <div class="expected-results">
50 Expected Results:
51 <br>
52 Net result is a third "cha". It should like this:
53 <BR>
54 one two cha cha cha three four cha cha cha
55 </div>
56 </div>
57
58 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
59 <div id="test" class="editing">
60 one two cha cha three four cha cha cha
61 </div>
62 </div>
63
64 <script>
65 runEditingTest();
66 </script>
67
68 </body>
69 </html>