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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_and_style.html

Issue 2338013005: Convert editing/inserting/insert-div-02[34].html to use w3c test harness (Closed)
Patch Set: 2016-09-15T15:23:49 Created 4 years, 3 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
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
5 <script>
6 test(() => assert_selection(
7 [
8 '<div contenteditable>',
9 '<p>one</p>',
10 '<p><br></p>',
11 '<p><b>two|</b></p>',
12 '<p><br></p>',
13 '<p>three</p>',
14 '</div>',
15 ].join(''),
16 'insertParagraph',
17 [
18 '<div contenteditable>',
19 '<p>one</p>',
20 '<p><br></p>',
21 '<p><b>two</b></p>',
22 '<p><b>|<br></b></p>',
23 '<p><br></p>',
24 '<p>three</p>',
25 '</div>',
26 ].join('')),
27 'insert BR in B');
28
29 test(() => assert_selection(
30 [
31 '<div contenteditable>',
32 '<p>^one|</p>',
33 '</div>',
34 ].join(''),
35 selection => {
36 selection.document.execCommand('bold');
37 selection.modify('move', 'forward', 'character');
38 selection.document.execCommand('insertParagraph');
39 // Set typing style to non-bold
40 selection.document.execCommand('bold');
41 selection.document.execCommand('insertText', false, 'abc');
42 selection.document.execCommand('insertParagraph');
43 selection.document.execCommand('insertParagraph');
44 },
45 [
46 '<div contenteditable>',
47 '<p><b>one</b></p>',
48 '<p>abc</p>',
49 '<p><br></p>',
50 '<p>|<br></p>',
51 '</div>',
52 ].join('')),
53 'insert BR twice');
54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698