Commit 25e22ce5 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() in editing/deleting/merge-no-br.html

This patch changes "merge-no-br.html" to utilize |selection_test()| for ease of
maintenance and enabling EditingNG.

Bug: 679977, 707656
Change-Id: I31aada7f8b8698fc24c6d76641bc400ebf10cb46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2262158
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781723}
parent 6b08f648
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script> <script>
if (window.testRunner) { // This places the caret before the 'T' in 'Two' and Deletes. 'One' and 'Two'
testRunner.dumpEditingCallbacks(); // should be merged but the blocks containing 'Three' and 'Four' should remain
testRunner.dumpAsLayoutWithPixelResults(); // untouched.
} selection_test(
</script> [
<style> '<div contenteditable>',
div { '<div style="border: 3px solid red;">One</div>',
margin: 0.5em; '<div style="border: 3px solid green;">',
padding: 0.5em; '|Two',
} '<div style="border: 3px solid black;">Three</div>',
</style> 'Four',
<p>This places the caret before the 'T' in 'Two' and Deletes. 'One' and 'Two' should be merged but the blocks containing 'Three' and 'Four' should remain untouched.</p> '</div>',
<div contenteditable="true"> '</div>',
<div style="border: 3px solid red;">One</div> ],
<div id="test"style="border: 3px solid green;">Two<div style="border: 3px solid black;">Three</div>Four</div> 'Delete',
</div> [
'<div contenteditable>',
<script> '<div style="border: 3px solid red;">One|Two</div>',
var s = window.getSelection(); '<div style="border: 3px solid green;">',
var e = document.getElementById("test"); '<div style="border: 3px solid black;">Three</div>',
s.collapse(e, 0); 'Four',
document.execCommand("Delete"); '</div>',
'</div>',
]);
</script> </script>
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 {P} at (0,0) size 784x40
LayoutText {#text} at (0,0) size 780x39
text run at (0,0) width 780: "This places the caret before the 'T' in 'Two' and Deletes. 'One' and 'Two' should be merged but the blocks containing 'Three'"
text run at (0,20) width 230: "and 'Four' should remain untouched."
LayoutBlockFlow {DIV} at (8,56) size 768x182
LayoutBlockFlow {DIV} at (16,16) size 736x42 [border: (3px solid #FF0000)]
LayoutText {#text} at (11,11) size 56x19
text run at (11,11) width 56: "OneTwo"
LayoutBlockFlow {DIV} at (16,66) size 736x100 [border: (3px solid #008000)]
LayoutBlockFlow {DIV} at (19,19) size 698x42 [border: (3px solid #000000)]
LayoutText {#text} at (11,11) size 37x19
text run at (11,11) width 37: "Three"
LayoutBlockFlow (anonymous) at (11,69) size 714x20
LayoutText {#text} at (0,0) size 30x19
text run at (0,0) width 30: "Four"
caret: position 3 of child 0 {#text} of child 1 {DIV} of child 2 {DIV} of body
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 {P} at (0,0) size 784x36
LayoutText {#text} at (0,0) size 741x36
text run at (0,0) width 741: "This places the caret before the 'T' in 'Two' and Deletes. 'One' and 'Two' should be merged but the blocks containing"
text run at (0,18) width 280: "'Three' and 'Four' should remain untouched."
LayoutBlockFlow {DIV} at (8,52) size 768x176
LayoutBlockFlow {DIV} at (16,16) size 736x40 [border: (3px solid #FF0000)]
LayoutText {#text} at (11,11) size 55x18
text run at (11,11) width 55: "OneTwo"
LayoutBlockFlow {DIV} at (16,64) size 736x96 [border: (3px solid #008000)]
LayoutBlockFlow {DIV} at (19,19) size 698x40 [border: (3px solid #000000)]
LayoutText {#text} at (11,11) size 38x18
text run at (11,11) width 38: "Three"
LayoutBlockFlow (anonymous) at (11,67) size 714x18
LayoutText {#text} at (0,0) size 31x18
text run at (0,0) width 31: "Four"
caret: position 3 of child 0 {#text} of child 1 {DIV} of child 2 {DIV} of body
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 {P} at (0,0) size 784x40
LayoutText {#text} at (0,0) size 771x39
text run at (0,0) width 771: "This places the caret before the 'T' in 'Two' and Deletes. 'One' and 'Two' should be merged but the blocks containing 'Three' and"
text run at (0,20) width 192: "'Four' should remain untouched."
LayoutBlockFlow {DIV} at (8,56) size 768x182
LayoutBlockFlow {DIV} at (16,16) size 736x42 [border: (3px solid #FF0000)]
LayoutText {#text} at (11,11) size 53x19
text run at (11,11) width 53: "OneTwo"
LayoutBlockFlow {DIV} at (16,66) size 736x100 [border: (3px solid #008000)]
LayoutBlockFlow {DIV} at (19,19) size 698x42 [border: (3px solid #000000)]
LayoutText {#text} at (11,11) size 35x19
text run at (11,11) width 35: "Three"
LayoutBlockFlow (anonymous) at (11,69) size 714x20
LayoutText {#text} at (0,0) size 29x19
text run at (0,0) width 29: "Four"
caret: position 3 of child 0 {#text} of child 1 {DIV} of child 2 {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