Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html |
| index aa8e89a0f627f36cbb82aa99fc88dd7173841333..5dc87efe837a14ebc46adc369a81308422927407 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html |
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/insert-div-022.html |
| @@ -1,50 +1,23 @@ |
| -<html> |
| -<head> |
| - |
| -<style> |
| -body { |
| - font-size: 24px; |
| -} |
| -.editing { |
| - border: 2px solid red; |
| - padding: 12px; |
| -} |
| -p { |
| - border: 2px solid blue; |
| - padding: 12px; |
| -} |
| -br { |
| - background-color: green; |
| -} |
| - |
| -</style> |
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script> |
| - |
| +<!doctype html> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../assert_selection.js"></script> |
| <script> |
| - |
| -function editingTest() { |
| - for (i = 0; i < 3; i++) |
| - moveSelectionForwardByCharacterCommand(); |
| - insertParagraphCommand(); |
| - typeCharacterCommand(); |
| -} |
| - |
| +test(() => assert_selection( |
| + [ |
| + '<div contenteditable>', |
| + '<p id="test"><b>foo|</b><br>bar</p>', |
| + '</div>', |
| + ].join(''), |
| + selection => { |
| + selection.document.execCommand('insertParagraph'); |
| + selection.document.execCommand('insertType', false, 'x'); |
| + }, |
| + [ |
| + '<div contenteditable>', |
| + '<p id="test"><b>foo</b></p>', |
| + '<p id="test"><b>|<br></b>bar</p>', |
|
Xiaocheng
2016/07/25 08:04:18
I thought there should be an 'x' before the caret,
yosin_UTC9
2016/07/25 08:36:00
There is a typo in L14, it should be "insertText"
|
| + '</div>', |
| + ].join('')), |
| + 'Insert P+B+BR'); |
| </script> |
| - |
| -<title>Editing Test</title> |
| -</head> |
| -<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;"> |
| - |
| -Test inserting paragraphs: should see "foo" in a blue box, then a blue box with with two lines in it: First line a bold "x"; second line a non-bold "bar". Fix for this bug: |
| -<a href="rdar://problem/3924579"><rdar://problem/3927554></a> Style info applied to remainder of document after a newline is entered |
| - |
| -<div style="height: 12px"></div> |
| - |
| -<p id="test"><b>foo</b><br>bar</p> |
| - |
| -<script> |
| -runEditingTest(); |
| -</script> |
| - |
| -</body> |
| -</html> |