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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/inserting/typing-around-br-001.html

Issue 2184603002: Convert editing/typing-around-br-001.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-07-26T14:59:23 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/platform/linux/editing/inserting/typing-around-br-001-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 </style>
11 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script >
12
13 <script> 5 <script>
14 6 test(() => assert_selection(
15 function moveNSpacesAndType(n) { 7 [
16 for (i = 0; i < n; i++) { 8 '<div contenteditable>',
17 moveSelectionForwardByCharacterCommand(); 9 '<span>|XX<br>XX<br><br>XX<br><br><br><br>XX</span>',
18 } 10 '</div>',
19 for (i = 0; i < 3; i++) { 11 ].join(''),
20 typeCharacterCommand(); 12 selection => {
21 } 13 function moveNSpacesAndType(n) {
22 } 14 for (var i = 0; i < n; ++i)
23 15 selection.modify('move', 'forward', 'character');
24 function editingTest() { 16 for (var i = 0; i < 3; ++i)
25 moveNSpacesAndType(2); 17 selection.document.execCommand('insertText', false, 'a');
26 moveNSpacesAndType(3); 18 }
27 moveNSpacesAndType(1); 19 moveNSpacesAndType(2);
28 moveNSpacesAndType(3); 20 moveNSpacesAndType(3);
29 moveNSpacesAndType(1); 21 moveNSpacesAndType(1);
30 moveNSpacesAndType(1); 22 moveNSpacesAndType(3);
31 moveNSpacesAndType(1); 23 moveNSpacesAndType(1);
32 moveNSpacesAndType(3); 24 moveNSpacesAndType(1);
33 } 25 moveNSpacesAndType(1);
34 26 moveNSpacesAndType(3);
27 },
28 [
29 '<div contenteditable>',
30 '<span>XXaaa<br>XXaaa<br>aaa<br>XXaaa<br>aaa<br>aaa<br>aaa<br>XXaaa| </span>',
31 '</div>',
32 ].join('')),
33 'Typing around BR');
35 </script> 34 </script>
36
37 <title>Editing Test</title>
38 </head>
39 <body>
40 <div contenteditable id="root" class="editing">
41 <span id="test">XX<br>XX<br><br>XX<br><br><br><br>XX</span>
42 </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/inserting/typing-around-br-001-expected.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698