Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html |
| diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html |
| index b2b847b22ea29dd38301a77dc3c5f08d5fb531d8..679908edfecdda22588c44ef7526d42b2989518a 100644 |
| --- a/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html |
| +++ b/third_party/WebKit/LayoutTests/editing/pasteboard/paste-text-at-tabspan-002.html |
| @@ -1,29 +1,33 @@ |
| -<!DOCTYPE html> |
| -<html> |
| -<body style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "> |
| -<div contenteditable id="root" style="border: 2px solid red; padding: 12px; font-size: 24px"> |
| -<span id="test">a<span class="Apple-tab-span" style="white-space:pre"> </span>z</span> |
| -</div> |
| -<script src="../editing.js"></script> |
| -<script src="../../resources/dump-as-markup.js"></script> |
| +<!doctype html> |
| +<head> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<script src="../assert_selection.js"></script> |
| <script> |
| +test(() => { |
| + assert_not_equals(window.internals, undefined, |
| + 'This test requires clipboard access'); |
| -var test = document.getElementById('test'); |
| -test.focus(); |
| -window.getSelection().collapse(test, 0); |
| - |
| -if (window.testRunner) |
| - testRunner.dumpEditingCallbacks(); |
| - |
| -extendSelectionForwardByCharacterCommand(); |
| -copyCommand(); |
| -for (i = 0; i < 2; i++) |
| - moveSelectionForwardByCharacterCommand(); |
| -pasteCommand(); |
| -typeCharacterCommand(); |
| - |
| -Markup.dump('root', 'You should see a\\tax\\t\\tz below'); |
| - |
| + assert_selection( |
| + [ |
| + '<div contenteditable>', |
| + 'a', |
| + '<span class="Apple-tab-span" style="white-space:pre"> | </span>', |
|
yosin_UTC9
2017/02/28 01:53:55
FYI: We're working to get rid of "Apple-tab-span"[
|
| + 'z', |
| + '</div>' |
| + ].join(''), |
| + selection => { |
| + selection.setClipboardData('a'); |
| + selection.document.execCommand('paste'); |
| + }, |
| + [ |
| + '<div contenteditable>', |
| + 'a', |
| + '<span class="Apple-tab-span" style="white-space:pre"> </span>', |
| + 'a|', |
| + '<span class="Apple-tab-span" style="white-space:pre"> </span>', |
| + 'z', |
| + '</div>' |
| + ].join('')); |
| +}, 'Paste text in tabspan'); |
| </script> |
| -</body> |
| -</html> |