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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/deleting/delete-and-undo.html

Issue 2164243002: Convert editing/deleting/delete-and-undo.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-22T13:23:27 Created 4 years, 5 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/platform/linux/editing/deleting/delete-and-undo-expected.png » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <!doctype html>
2 <head> 2 <script src="../../resources/testharness.js"></script>
3 3 <script src="../../resources/testharnessreport.js"></script>
4 <style> 4 <script src="../assert_selection.js"></script>
5 .editing {
6 border: 2px solid red;
7 padding: 12px;
8 font-size: 24px;
9 }
10 .explanation {
11 border: 2px solid blue;
12 padding: 12px;
13 font-size: 24px;
14 margin-bottom: 24px;
15 }
16 </style>
17 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
18
19 <script> 5 <script>
20 6 test(() => {
21 function editingTest() { 7 assert_selection(
22 for (i = 0; i < 4; i++) 8 '<div contenteditable>foo ^bar |baz</div>',
23 moveSelectionForwardByCharacterCommand(); 9 selection => {
24 for (i = 0; i < 5; i++) 10 selection.document.execCommand('delete');
25 extendSelectionForwardByCharacterCommand(); 11 selection.document.execCommand('undo');
26 for (i = 0; i < 5; i++) 12 },
27 deleteCommand(); 13 '<div contenteditable>foo ^bar |baz</div>');
28 undoCommand(); 14 }, '"delete" then "undo" changes nothing');
29 moveSelectionForwardByCharacterCommand();
30 }
31
32 </script> 15 </script>
33
34 <title>Editing Test</title>
35 </head>
36 <body>
37 <div class="explanation">
38 Should see "foo bar baz" in the red box. Insertion point should be between the " b" and "a" of "baz".
39 </div>
40
41 <div id="root" contenteditable="true" style="word-wrap: break-word; -webkit-nbsp -mode: space; -webkit-line-break: after-white-space;">
42 <div id="test" class="editing">foo bar baz</div></div>
43
44 <script>
45 runEditingTest();
46 </script>
47
48 </body>
49 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/platform/linux/editing/deleting/delete-and-undo-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698