2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / editing / deleting / smart-delete-002.html
blob54a550d964b8f0796f74d36455d7824d0b8d7002
1 <html>
2 <head>
4 <style>
5 .editing {
6 border: 2px solid red;
7 font-size: 24px;
9 .explanation {
10 border: 2px solid blue;
11 padding: 12px;
12 font-size: 24px;
13 margin-bottom: 24px;
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>
21 <script>
23 function editingTest() {
24 moveSelectionForwardByWordCommand();
25 moveSelectionForwardByCharacterCommand();
26 extendSelectionForwardByWordCommand();
27 deleteCommand();
30 </script>
32 <title>Editing Test</title>
33 </head>
34 <body>
36 <div class="explanation">
37 <div class="scenario">
38 Tests:
39 <br>
40 Smart delete when deleting the second word of a line.
41 </div>
42 <div class="expected-results">
43 Expected Results:
44 <br>
45 The second word and the space before the second word should be deleted. It should like this this:
46 <BR>
47 foo baz
48 </div>
49 </div>
51 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
52 <div id="test" class="editing">
53 foo bar baz
54 </div>
55 </div>
57 <script>
58 runEditingTest();
59 </script>
61 </body>
62 </html>