Commit d11b3f33 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() in editing/pasteboard/paste-text-at-tabspan-001.html

This patch changes "paste-text-at-tabspan-001.html" to utilize |selection_test|
for ease of maintenance and enabling EditingNG.

Bug: 679977, 707656
Change-Id: I541d054ef7427b17eaa99f35162d6cd4c36697ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2259396
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781226}
parent 5906c258
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
You should see aax\tz below:
| "
"
| <span>
| id="test"
| "aax<#selection-caret>"
| <span>
| style="white-space:pre"
| " "
| "z"
| "
"
<!DOCTYPE html> <!DOCTYPE html>
<html> <script src="../../resources/testharness.js"></script>
<body style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "> <script src="../../resources/testharnessreport.js"></script>
<div contenteditable id="root" style="border: 2px solid red; padding: 12px; font-size: 24px"> <script src="../assert_selection.js"></script>
<span id="test">a<span style="white-space:pre"> </span>z</span>
</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<script> <script>
selection_test(
var test = document.getElementById('test'); [
test.focus(); '<div contenteditable>',
window.getSelection().collapse(test, 0); 'a<span style="white-space:pre">|\t\t\t</span>z',
'</div>',
if (window.testRunner) ],
testRunner.dumpEditingCallbacks(); selection => {
if (!window.internals)
extendSelectionForwardByCharacterCommand(); throw 'This test requires internals.';
copyCommand(); selection.setClipboardData('X');
moveSelectionForwardByCharacterCommand(); selection.document.execCommand('paste');
pasteCommand(); },
typeCharacterCommand(); [
'<div contenteditable>',
Markup.dump('root', 'You should see aax\\tz below'); 'aX|<span style="white-space:pre">\t\t\t</span>z',
'</div>',
],
'Paste in tabspan');
</script> </script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment