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

Utilize selection_test() for "editing/execCommand/5569741.html"

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

Following patch will rename "5138441.html" to
"indent_paragraph_at_empty_paragraph_in_list_item.html".

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

Bug: 679977, 636993
Change-Id: Ib1b84bdf0c864c54cc1a039db56406c3a3c5fc77
Reviewed-on: https://chromium-review.googlesource.com/991656Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547952}
parent 0a14a2b0
<p>This tests for a bug where hitting return inside an empty paragraph in a non-empty list item would remove it.</p>
<div id="div" contenteditable="true">
<ul><li id="li">foo<br><br></li></ul>
</div>
<!doctype HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
li = document.getElementById("li");
sel = window.getSelection();
sel.collapse(li, li.childNodes.length);
document.execCommand("InsertParagraph");
// This tests for a bug where hitting return inside an empty paragraph in a
// non-empty list item would remove it.
selection_test(
[
'<div contenteditable>',
'<ul>',
'<li>foo<br><br>|</li>',
'</ul>',
'</div>',
],
'insertParagraph',
[
'<div contenteditable>',
'<ul>',
'<li>foo<br><br></li>',
'<li>|<br></li>',
'</ul>',
'</div>',
],
'insertParagraph at empty paragraph in list item');
</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 784x576
LayoutBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 681x19
text run at (0,0) width 681: "This tests for a bug where hitting return inside an empty paragraph in a non-empty list item would remove it."
LayoutBlockFlow {DIV} at (0,36) size 784x60
LayoutBlockFlow {UL} at (0,0) size 784x60
LayoutListItem {LI} at (40,0) size 744x40
LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet
LayoutText {#text} at (0,0) size 21x19
text run at (0,0) width 21: "foo"
LayoutBR {BR} at (21,15) size 0x0
LayoutBR {BR} at (0,20) size 0x19
LayoutListItem {LI} at (40,40) size 744x20
LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet
LayoutBR {BR} at (0,0) size 0x19
caret: position 0 of child 0 {BR} of child 1 {LI} of child 1 {UL} 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 784x576
LayoutBlockFlow {P} at (0,0) size 784x18
LayoutText {#text} at (0,0) size 697x18
text run at (0,0) width 697: "This tests for a bug where hitting return inside an empty paragraph in a non-empty list item would remove it."
LayoutBlockFlow {DIV} at (0,34) size 784x54
LayoutBlockFlow {UL} at (0,0) size 784x54
LayoutListItem {LI} at (40,0) size 744x36
LayoutListMarker (anonymous) at (-17,0) size 7x18: bullet
LayoutText {#text} at (0,0) size 22x18
text run at (0,0) width 22: "foo"
LayoutBR {BR} at (21,14) size 1x0
LayoutBR {BR} at (0,18) size 0x18
LayoutListItem {LI} at (40,36) size 744x18
LayoutListMarker (anonymous) at (-17,0) size 7x18: bullet
LayoutBR {BR} at (0,0) size 0x18
caret: position 0 of child 0 {BR} of child 1 {LI} of child 1 {UL} 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 784x576
LayoutBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 643x19
text run at (0,0) width 643: "This tests for a bug where hitting return inside an empty paragraph in a non-empty list item would remove it."
LayoutBlockFlow {DIV} at (0,36) size 784x60
LayoutBlockFlow {UL} at (0,0) size 784x60
LayoutListItem {LI} at (40,0) size 744x40
LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet
LayoutText {#text} at (0,0) size 20x19
text run at (0,0) width 20: "foo"
LayoutBR {BR} at (20,15) size 0x0
LayoutBR {BR} at (0,20) size 0x19
LayoutListItem {LI} at (40,40) size 744x20
LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet
LayoutBR {BR} at (0,0) size 0x19
caret: position 0 of child 0 {BR} of child 1 {LI} of child 1 {UL} 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