Commit 715ceb2b authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() in editing/inserting/insert-text-at-tabspan-001.html

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

Bug: 679977, 707656
Change-Id: I369a82d7b8c6874d016864f0e6e84bbd3567ad6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2259874Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781230}
parent 2344fb48
<html>
<head>
<style>
.editing {
border: 2px solid red;
padding: 12px;
font-size: 24px;
}
</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() {
moveSelectionForwardByCharacterCommand();
typeCharacterCommand();
}
selection_test(
[
'<div contenteditable>',
'a<span style="white-space:pre">|\t\t\t</span>z',
'</div>',
],
'insertText X',
[
'<div contenteditable>',
'aX|<span style="white-space:pre">\t\t\t</span>z',
'</div>',
],
'Insert text at tab span');
</script>
<title>Editing Test</title>
</head>
<body style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">
<div contenteditable id="root" class="editing">
<span id="test">a<span style="white-space:pre"> </span>z</span>
</div>
<script>
runEditingTest();
</script>
</body>
</html>
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
LayoutInline {SPAN} at (14,14) size 155x27
LayoutText {#text} at (14,14) size 23x27
text run at (14,14) width 23: "ax"
LayoutInline {SPAN} at (37,14) size 121x27
LayoutText {#text} at (37,14) size 121x27
text run at (37,14) width 121: "\x{9}\x{9}\x{9}"
LayoutText {#text} at (158,14) size 11x27
text run at (158,14) width 11: "z"
LayoutText {#text} at (0,0) size 0x0
caret: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
LayoutInline {SPAN} at (14,14) size 155x28
LayoutText {#text} at (14,14) size 23x28
text run at (14,14) width 23: "ax"
LayoutInline {SPAN} at (36,14) size 122x28
LayoutText {#text} at (36,14) size 122x28
text run at (36,14) width 122: "\x{9}\x{9}\x{9}"
LayoutText {#text} at (157,14) size 12x28
text run at (157,14) width 12: "z"
LayoutText {#text} at (0,0) size 0x0
caret: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
layer at (0,0) size 800x600
LayoutView at (0,0) size 800x600
layer at (0,0) size 800x600
LayoutBlockFlow {HTML} at (0,0) size 800x600
LayoutBlockFlow {BODY} at (8,8) size 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
LayoutInline {SPAN} at (14,14) size 154x27
LayoutText {#text} at (14,14) size 23x27
text run at (14,14) width 23: "ax"
LayoutInline {SPAN} at (37,14) size 121x27
LayoutText {#text} at (37,14) size 121x27
text run at (37,14) width 121: "\x{9}\x{9}\x{9}"
LayoutText {#text} at (158,14) size 10x27
text run at (158,14) width 10: "z"
LayoutText {#text} at (0,0) size 0x0
caret: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
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