| Index: third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_and_style.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_and_style.html b/third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_and_style.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..caa5ed7e9bedc78e58d039a9cbe668ff408c44ca
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/insert_paragraph_and_style.html
|
| @@ -0,0 +1,54 @@
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<script>
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<p>one</p>',
|
| + '<p><br></p>',
|
| + '<p><b>two|</b></p>',
|
| + '<p><br></p>',
|
| + '<p>three</p>',
|
| + '</div>',
|
| + ].join(''),
|
| + 'insertParagraph',
|
| + [
|
| + '<div contenteditable>',
|
| + '<p>one</p>',
|
| + '<p><br></p>',
|
| + '<p><b>two</b></p>',
|
| + '<p><b>|<br></b></p>',
|
| + '<p><br></p>',
|
| + '<p>three</p>',
|
| + '</div>',
|
| + ].join('')),
|
| + 'insert BR in B');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<p>^one|</p>',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.document.execCommand('bold');
|
| + selection.modify('move', 'forward', 'character');
|
| + selection.document.execCommand('insertParagraph');
|
| + // Set typing style to non-bold
|
| + selection.document.execCommand('bold');
|
| + selection.document.execCommand('insertText', false, 'abc');
|
| + selection.document.execCommand('insertParagraph');
|
| + selection.document.execCommand('insertParagraph');
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + '<p><b>one</b></p>',
|
| + '<p>abc</p>',
|
| + '<p><br></p>',
|
| + '<p>|<br></p>',
|
| + '</div>',
|
| + ].join('')),
|
| + 'insert BR twice');
|
| +</script>
|
|
|