Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-by-word-001.html

Issue 2252153004: Convert editing/delete-by-word-00[12].html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-18T16:31:46 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/delete-by-word-001-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
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 <title>Editing Test</title>
21 </head>
22 <body>
23 <div class="explanation">
24 <div class="scenario">
25 Tests:
26 <br>
27 Option-delete when a typing command is open.
28 </div>
29 <div class="expected-results">
30 Expected Results:
31 <br>
32 Net result is a third "cha". It should like this:
33 <BR>
34 one two cha cha cha three four cha cha cha
35 </div>
36 </div>
37 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: s pace; -khtml-line-break: after-white-space;">
38 <div id="test" class="editing">
39 one two cha cha three four cha cha cha
40 </div>
41 </div>
42 <script>
43
44 if (window.internals)
45 internals.settings.setEditingBehavior("mac");
46
47 function sendDeleteWordKey()
48 {
49 var deleteWordModifiers;
50 if (navigator.userAgent.search(/\bMac OS X\b/) != -1)
51 deleteWordModifiers = ["altKey"];
52 else
53 deleteWordModifiers = ["ctrlKey"];
54 if (window.eventSender)
55 eventSender.keyDown("Backspace", deleteWordModifiers);
56 debugForDumpAsText("DeleteWord");
57 }
58
59 function editingTest()
60 {
61 moveSelectionForwardByWordCommand();
62 moveSelectionForwardByWordCommand();
63 typeCharacterCommand(' ');
64 typeCharacterCommand('a');
65 typeCharacterCommand('b');
66 typeCharacterCommand('c');
67 sendDeleteWordKey();
68 typeCharacterCommand('c');
69 typeCharacterCommand('h');
70 typeCharacterCommand('a');
71 }
72
73 runDumpAsTextEditingTest(true);
74 </script>
75 </body>
76 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/editing/deleting/delete-by-word-001-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698