Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / undo / undo-deleteWord.html
blob9760bd153f6ecbcdec401c873a4476343bb4668a
1 <html>
2 <head>
4 <style>
5 .editing {
6 border: 2px solid red;
8 .explanation {
9 border: 2px solid blue;
10 padding: 12px;
11 font-size: 24px;
12 margin-bottom: 24px;
14 .scenario { margin-bottom: 16px;}
15 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
16 </style>
17 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
19 <script>
21 function sendDeleteWordKey()
23 var deleteWordModifiers;
24 if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
25 deleteWordModifiers = ["altKey"];
26 else
27 deleteWordModifiers = ["ctrlKey"];
29 if (window.eventSender)
30 eventSender.keyDown("backspace", deleteWordModifiers);
31 window.setTimeout(undoNow, 100);
34 function undoNow()
36 document.execCommand("Undo");
38 if (window.testRunner)
39 testRunner.notifyDone();
42 function editingTest() {
43 typeCharacterCommand('o');
44 typeCharacterCommand('n');
45 typeCharacterCommand('e');
46 typeCharacterCommand(' ');
47 typeCharacterCommand('t');
48 typeCharacterCommand('w');
49 typeCharacterCommand('o');
50 typeCharacterCommand(' ');
51 typeCharacterCommand('t');
52 typeCharacterCommand('h');
53 typeCharacterCommand('r');
54 typeCharacterCommand('e');
55 typeCharacterCommand('e');
56 typeCharacterCommand(' ');
57 typeCharacterCommand('f');
58 typeCharacterCommand('o');
59 typeCharacterCommand('u');
60 typeCharacterCommand('r');
62 window.setTimeout(sendDeleteWordKey, 100);
65 </script>
67 <title>Editing Test</title>
68 </head>
69 <body>
71 <div class="explanation">
72 <div class="scenario">
73 Tests:
74 <br>
75 Undo a delete word after a series of insertText does not wipe out the entire content.
76 </div>
77 </div>
79 <div contenteditable id="root">
80 <div id="test" class="editing"></div>
81 </div>
83 <script>
84 if (window.testRunner) {
85 testRunner.dumpAsText();
86 testRunner.waitUntilDone();
89 var selection = window.getSelection();
90 selection.collapse(document.getElementById("test"), 0);
91 editingTest();
92 </script>
94 </body>
95 </html>