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>
<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 style="white-space:pre"> </span>z</span>
</div>
<script src="../editing.js"></script>
<script src="../../resources/dump-as-markup.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
var test = document.getElementById('test');
test.focus();
window.getSelection().collapse(test, 0);
if (window.testRunner)
testRunner.dumpEditingCallbacks();
extendSelectionForwardByCharacterCommand();
copyCommand();
moveSelectionForwardByCharacterCommand();
pasteCommand();
typeCharacterCommand();
Markup.dump('root', 'You should see aax\\tz below');
selection_test(
[
'<div contenteditable>',
'a<span style="white-space:pre">|\t\t\t</span>z',
'</div>',
],
selection => {
if (!window.internals)
throw 'This test requires internals.';
selection.setClipboardData('X');
selection.document.execCommand('paste');
},
[
'<div contenteditable>',
'aX|<span style="white-space:pre">\t\t\t</span>z',
'</div>',
],
'Paste in tabspan');
</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