Commit 6f99e968 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() for "editing/deleting/5272440.html"

This patch changes "5272440.html" to utilize |selection_test()| for ease of
maintenance.

Following patch will rename "5272440.html" to
"delete_all_contents_in_root_editable.html".

Note: "5272440.html" is failed on layout_ng bot due by pixel test.

Bug: 679977, 636993
Change-Id: I1455f820e8e0baf729fc8a1cca87705db4046674
Reviewed-on: https://chromium-review.googlesource.com/991493Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547645}
parent 86ae6639
<p>This tests for a bug where deleting the contents of an editable root that's inline would introduce a new line.</p> <!doctype HTML>
<div style="border: 1px solid black;"><span id="span" contenteditable="true">foo</span></div> <script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script> <script>
span = document.getElementById("span"); // This tests for a bug where deleting the contents of an editable root that's
selection = window.getSelection(); // inline would introduce a new line.
selection.collapse(span, 0); selection_test(
document.execCommand("SelectAll"); '<div><span contenteditable>x|</span></div>',
document.execCommand("Delete"); 'Delete',
document.execCommand("InsertText", false, "x"); '<div><span contenteditable>|</span></div>',
document.execCommand("Delete"); 'Deleting contents of root editable');
document.execCommand("InsertText", false, "x");
document.execCommand("Delete");
document.execCommand("InsertText", false, "There shouldn't be any blank lines in the black bordered area.");
</script> </script>
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 784x20
LayoutText {#text} at (0,0) size 669x19
text run at (0,0) width 669: "This tests for a bug where deleting the contents of an editable root that's inline would introduce a new line."
LayoutBlockFlow {DIV} at (0,36) size 784x22 [border: (1px solid #000000)]
LayoutInline {SPAN} at (0,0) size 387x19
LayoutText {#text} at (1,1) size 387x19
text run at (1,1) width 387: "There shouldn't be any blank lines in the black bordered area."
caret: position 62 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body
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 784x18
LayoutText {#text} at (0,0) size 683x18
text run at (0,0) width 683: "This tests for a bug where deleting the contents of an editable root that's inline would introduce a new line."
LayoutBlockFlow {DIV} at (0,34) size 784x20 [border: (1px solid #000000)]
LayoutInline {SPAN} at (0,0) size 394x18
LayoutText {#text} at (1,1) size 394x18
text run at (1,1) width 394: "There shouldn't be any blank lines in the black bordered area."
caret: position 62 of child 0 {#text} of child 0 {SPAN} of child 2 {DIV} of body
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 784x20
LayoutText {#text} at (0,0) size 633x19
text run at (0,0) width 633: "This tests for a bug where deleting the contents of an editable root that's inline would introduce a new line."
LayoutBlockFlow {DIV} at (0,36) size 784x22 [border: (1px solid #000000)]
LayoutInline {SPAN} at (0,0) size 370x19
LayoutText {#text} at (1,1) size 370x19
text run at (1,1) width 370: "There shouldn't be any blank lines in the black bordered area."
caret: position 62 of child 0 {#text} of child 0 {SPAN} 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