Commit 16cd9523 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() for "editing/inserting/4875189-1.html"

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

Following patch will rename "4875189-1.html" to "replace_in_list_item.html"

Note: "4875189-1.html" is failed on layout_ng bot du by pixel test.

Bug: 679977, 636993
Change-Id: I46817e1e78106644fe689a20a521bf45762af568
Reviewed-on: https://chromium-review.googlesource.com/991698Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547888}
parent 25e1bcd8
<p>This tests for a bug when replacing the contents of a list. The list shouldn't be removed, just its contents.</p> <!doctype HTML>
<div contenteditable="true"><ul><li id="li">You shouldn't see this.</li></ul></div> <script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script> <script>
var r = document.createRange(); selection_test(
var li = document.getElementById("li"); '<div contenteditable><ul><li>^ab|</li></ul></div>',
r.setStart(li, 0); 'insertHTML CD',
r.setEnd(li, li.childNodes.length); '<div contenteditable><ul><li>CD|</li></ul></div>',
var selection = window.getSelection(); 'InsertHTML to replace content of list item');
selection.addRange(r);
document.execCommand("InsertHTML", false, "This should be in a list item.")
</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 784x576
LayoutBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 652x19
text run at (0,0) width 358: "This tests for a bug when replacing the contents of a list. "
text run at (358,0) width 294: "The list shouldn't be removed, just its contents."
LayoutBlockFlow {DIV} at (0,36) size 784x20
LayoutBlockFlow {UL} at (0,0) size 784x20
LayoutListItem {LI} at (40,0) size 744x20
LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet
LayoutText {#text} at (0,0) size 177x19
text run at (0,0) width 177: "This should be in a list item."
caret: position 30 of child 0 {#text} of child 0 {LI} of child 0 {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 667x18
text run at (0,0) width 366: "This tests for a bug when replacing the contents of a list. "
text run at (365,0) width 302: "The list shouldn't be removed, just its contents."
LayoutBlockFlow {DIV} at (0,34) size 784x18
LayoutBlockFlow {UL} at (0,0) size 784x18
LayoutListItem {LI} at (40,0) size 744x18
LayoutListMarker (anonymous) at (-17,0) size 7x18: bullet
LayoutText {#text} at (0,0) size 182x18
text run at (0,0) width 182: "This should be in a list item."
caret: position 30 of child 0 {#text} of child 0 {LI} of child 0 {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 619x19
text run at (0,0) width 339: "This tests for a bug when replacing the contents of a list. "
text run at (339,0) width 280: "The list shouldn't be removed, just its contents."
LayoutBlockFlow {DIV} at (0,36) size 784x20
LayoutBlockFlow {UL} at (0,0) size 784x20
LayoutListItem {LI} at (40,0) size 744x20
LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet
LayoutText {#text} at (0,0) size 165x19
text run at (0,0) width 165: "This should be in a list item."
caret: position 30 of child 0 {#text} of child 0 {LI} of child 0 {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