10 border:
2px solid blue;
15 .scenario { margin-bottom:
16px;}
16 .scenario:first-line { font-weight: bold; margin-bottom:
16px;}
17 .expected-results:first-line { font-weight: bold }
19 <script src=../editing.js
language=
"JavaScript" type=
"text/JavaScript" ></script>
20 <title>Editing Test
</title>
23 <div class=
"explanation">
24 <div class=
"scenario">
27 Option-delete when a typing command is open.
29 <div class=
"expected-results">
32 Net result is a third
"cha". It should like this:
34 one two cha cha cha three four cha cha cha
37 <div contenteditable
id=
"root" style=
"word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
38 <div id=
"test" class=
"editing">
39 one two cha cha three four cha cha cha
45 internals
.settings
.setEditingBehavior("mac");
47 function sendDeleteWordKey()
49 var deleteWordModifiers
;
50 if (navigator
.userAgent
.search(/\bMac OS X\b/) != -1)
51 deleteWordModifiers
= ["altKey"];
53 deleteWordModifiers
= ["ctrlKey"];
54 if (window
.eventSender
)
55 eventSender
.keyDown("backspace", deleteWordModifiers
);
56 debugForDumpAsText("DeleteWord");
59 function editingTest()
61 moveSelectionForwardByWordCommand();
62 moveSelectionForwardByWordCommand();
63 typeCharacterCommand(' ');
64 typeCharacterCommand('a');
65 typeCharacterCommand('b');
66 typeCharacterCommand('c');
68 typeCharacterCommand('c');
69 typeCharacterCommand('h');
70 typeCharacterCommand('a');
73 runDumpAsTextEditingTest(true);