| Index: third_party/WebKit/LayoutTests/editing/inserting/typing-around-image-001.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/inserting/typing-around-image-001.html b/third_party/WebKit/LayoutTests/editing/inserting/typing-around-image-001.html
|
| index 4236efeb7f1ca4b708926a46d6e64cb61a6df8be..1d995123d96c3489d00544d5d6b98ae7fcf597a4 100644
|
| --- a/third_party/WebKit/LayoutTests/editing/inserting/typing-around-image-001.html
|
| +++ b/third_party/WebKit/LayoutTests/editing/inserting/typing-around-image-001.html
|
| @@ -1,46 +1,35 @@
|
| -<html>
|
| -<head>
|
| -
|
| -<style>
|
| -.editing {
|
| - border: 2px solid red;
|
| - padding: 12px;
|
| - font-size: 24px;
|
| -}
|
| -</style>
|
| -<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
|
| -
|
| -<script>
|
| -
|
| -function moveNSpacesAndType(n) {
|
| - for (i = 0; i < n; i++) {
|
| - moveSelectionForwardByCharacterCommand();
|
| - }
|
| - for (i = 0; i < 3; i++) {
|
| - typeCharacterCommand();
|
| - }
|
| -}
|
| -
|
| -function editingTest() {
|
| - typeCharacterCommand();
|
| - moveNSpacesAndType(1);
|
| - moveNSpacesAndType(1);
|
| - moveNSpacesAndType(1);
|
| - moveNSpacesAndType(1);
|
| -}
|
| -
|
| -</script>
|
| -
|
| -<title>Editing Test</title>
|
| -</head>
|
| -<body>
|
| -<div contenteditable id="root" class="editing">
|
| -<span id="test"><img src="../resources/abe.png"><img src="../resources/abe.png"> <img src="../resources/abe.png"></span>
|
| -</div>
|
| -
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| <script>
|
| -runEditingTest();
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '|<img src="../resources/abe.png">',
|
| + '<img src="../resources/abe.png">',
|
| + ' <img src="../resources/abe.png">',
|
| + '</div>',
|
| + ].join(''),
|
| + selection => {
|
| + selection.document.execCommand('insertText', false, 'a');
|
| + selection.modify('move', 'forward', 'character');
|
| + selection.document.execCommand('insertText', false, 'bcd');
|
| + selection.modify('move', 'forward', 'character');
|
| + selection.document.execCommand('insertText', false, 'efg');
|
| + selection.modify('move', 'forward', 'character');
|
| + selection.document.execCommand('insertText', false, 'hij');
|
| + selection.modify('move', 'forward', 'character');
|
| + selection.document.execCommand('insertText', false, 'klm');
|
| +
|
| + },
|
| + [
|
| + '<div contenteditable>',
|
| + 'a<img src="../resources/abe.png">',
|
| + 'bcd<img src="../resources/abe.png">',
|
| + 'efg\u{00A0}hij<img src="../resources/abe.png">',
|
| + 'klm|',
|
| + '</div>',
|
| + ].join('')),
|
| + 'insertText around image');
|
| </script>
|
| -
|
| -</body>
|
| -</html>
|
|
|