Commit 1c5e7cf7 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() for "editing/execCommand/4580583-{1,2}.html"

This patch changes "4580583-{1,2}.html" to utilize |selection_test()| and
integrate into "4580583-1.html", since both tests use similar test input, for
ease of maintenance.

Following patch will rename "4580583-1.html" to
"insert_newline_in_quoted_content.html".

Note: "4580583-{1,2}.html" is failed on layout_ng bot due by pixel test.

Bug: 679977, 636993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie2eff78bee11cbc09f2bbdfa1f915b6cf662fe55
Reviewed-on: https://chromium-review.googlesource.com/991695
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548011}
parent cec431d8
...@@ -206,8 +206,6 @@ crbug.com/591099 editing/deleting/5272440.html [ Failure Pass ] ...@@ -206,8 +206,6 @@ crbug.com/591099 editing/deleting/5272440.html [ Failure Pass ]
crbug.com/591099 editing/deleting/merge-whitespace-pre.html [ Failure ] crbug.com/591099 editing/deleting/merge-whitespace-pre.html [ Failure ]
crbug.com/591099 editing/deleting/transpose-empty.html [ Failure Pass ] crbug.com/591099 editing/deleting/transpose-empty.html [ Failure Pass ]
crbug.com/591099 editing/deleting/type-delete-after-quote.html [ Failure Pass ] crbug.com/591099 editing/deleting/type-delete-after-quote.html [ Failure Pass ]
crbug.com/591099 editing/execCommand/4580583-1.html [ Failure ]
crbug.com/591099 editing/execCommand/4580583-2.html [ Failure ]
crbug.com/591099 editing/execCommand/5138441.html [ Failure ] crbug.com/591099 editing/execCommand/5138441.html [ Failure ]
crbug.com/591099 editing/execCommand/5569741.html [ Failure ] crbug.com/591099 editing/execCommand/5569741.html [ Failure ]
crbug.com/591099 editing/execCommand/align-in-span.html [ Failure ] crbug.com/591099 editing/execCommand/align-in-span.html [ Failure ]
......
<html> <!doctype HTML>
<head> <script src="../../resources/testharness.js"></script>
<style> <script src="../../resources/testharnessreport.js"></script>
blockquote { <script src="../assert_selection.js"></script>
color: blue; <script>
border-left: 2px solid blue; selection_test(
margin-left: 2px; [
} '<div contenteditable>',
</style> '<blockquote type="cite">',
</head> '<ol>',
<body> '<li>One</li>',
<p>This tests to make sure that breaking a quoted list doesn't renumber the list. You should see a list broken in two below, the list items numbered 1, 2, 3, 4.</p> '<li>Two|</li>',
<div contenteditable="true"> '<li>Three</li>',
<blockquote type="cite"> '<li>Four</li>',
<ol> '</ol>',
<li>One</li> '</blockquote>',
<li id="two">Two</li> '</div>',
<li>Three</li> ],
<li>Four</li> 'InsertNewlineInQuotedContent',
</ol> [
</blockquote> '<div contenteditable>',
</div> '<blockquote type="cite">',
'<ol>',
'<li>One</li>',
'<li>Two</li>',
'</ol>',
'</blockquote>|',
'<br>',
'<blockquote type="cite">',
'<ol start="3">',
'<li>Three</li>',
'<li>Four</li>',
'</ol>',
'</blockquote>',
'</div>',
],
'1. InsertNewlineInQuotedContent to insert newline at end of list item');
<script> selection_test(
li = document.getElementById("two"); [
selection = window.getSelection(); '<div contenteditable>',
selection.collapse(li, li.childNodes.length); '<blockquote type="cite">',
document.execCommand("InsertNewlineInQuotedContent"); '<ol>',
</script> '<li>One</li>',
</body> '<li>Two</li>',
</html> '<li>Thr|ee</li>',
'<li>Four</li>',
'</ol>',
'</blockquote>',
'</div>',
],
'InsertNewlineInQuotedContent',
[
'<div contenteditable>',
'<blockquote type="cite">',
'<ol>',
'<li>One</li>',
'<li>Two</li>',
'<li>Thr</li>',
'</ol>',
'</blockquote>',
'|<br>',
'<blockquote type="cite">',
'<ol start="3">',
'<li>ee</li>',
'<li>Four</li>',
'</ol>',
'</blockquote>',
'</div>',
],
'2. InsertNewlineInQuotedContent into middle of list item');
</script>
<html>
<head>
<style>
blockquote {
color: blue;
border-left: 2px solid blue;
margin-left: 2px;
}
</style>
</head>
<body>
<p>This tests to make sure that breaking a quoted list doesn't renumber the list. You should see a list broken in two below, the list items numbered 1, 2, 2, 3, 4. Two list items will be numbered '2' because the original item '2' was split.</p>
<div contenteditable="true">
<blockquote type="cite">
<ol>
<li>One</li>
<li id="two">TwoTwo</li>
<li>Three</li>
<li>Four</li>
</ol>
</blockquote>
</div>
<script>
li = document.getElementById("two");
text = li.firstChild;
selection = window.getSelection();
selection.collapse(text, 3);
document.execCommand("InsertNewlineInQuotedContent");
</script>
</body>
</html>
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 784x40
LayoutText {#text} at (0,0) size 763x39
text run at (0,0) width 474: "This tests to make sure that breaking a quoted list doesn't renumber the list. "
text run at (474,0) width 289: "You should see a list broken in two below, the"
text run at (0,20) width 186: "list items numbered 1, 2, 3, 4."
LayoutBlockFlow {DIV} at (0,56) size 784x132
LayoutBlockFlow {BLOCKQUOTE} at (2,0) size 742x40 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x40
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
LayoutText {#text} at (0,0) size 27x19
text run at (0,0) width 27: "One"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
LayoutText {#text} at (0,0) size 28x19
text run at (0,0) width 28: "Two"
LayoutBlockFlow (anonymous) at (0,56) size 784x20
LayoutBR {BR} at (0,0) size 0x19
LayoutBlockFlow {BLOCKQUOTE} at (2,92) size 742x40 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x40
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "3"
LayoutText {#text} at (0,0) size 37x19
text run at (0,0) width 37: "Three"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "4"
LayoutText {#text} at (0,0) size 30x19
text run at (0,0) width 30: "Four"
caret: position 0 of child 2 {BR} of child 3 {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 784x40
LayoutText {#text} at (0,0) size 763x39
text run at (0,0) width 474: "This tests to make sure that breaking a quoted list doesn't renumber the list. "
text run at (474,0) width 289: "You should see a list broken in two below, the"
text run at (0,20) width 666: "list items numbered 1, 2, 2, 3, 4. Two list items will be numbered '2' because the original item '2' was split."
LayoutBlockFlow {DIV} at (0,56) size 784x152
LayoutBlockFlow {BLOCKQUOTE} at (2,0) size 742x40 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x40
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
LayoutText {#text} at (0,0) size 27x19
text run at (0,0) width 27: "One"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
LayoutText {#text} at (0,0) size 28x19
text run at (0,0) width 28: "Two"
LayoutBlockFlow (anonymous) at (0,56) size 784x20
LayoutBR {BR} at (0,0) size 0x19
LayoutBlockFlow {BLOCKQUOTE} at (2,92) size 742x60 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x60
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
LayoutText {#text} at (0,0) size 28x19
text run at (0,0) width 28: "Two"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "3"
LayoutText {#text} at (0,0) size 37x19
text run at (0,0) width 37: "Three"
LayoutListItem {LI} at (40,40) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "4"
LayoutText {#text} at (0,0) size 30x19
text run at (0,0) width 30: "Four"
caret: position 0 of child 2 {BR} of child 3 {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 784x36
LayoutText {#text} at (0,0) size 781x36
text run at (0,0) width 486: "This tests to make sure that breaking a quoted list doesn't renumber the list. "
text run at (485,0) width 296: "You should see a list broken in two below, the"
text run at (0,18) width 191: "list items numbered 1, 2, 3, 4."
LayoutBlockFlow {DIV} at (0,52) size 784x122
LayoutBlockFlow {BLOCKQUOTE} at (2,0) size 742x36 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x36
LayoutListItem {LI} at (40,0) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "1"
LayoutText {#text} at (0,0) size 27x18
text run at (0,0) width 27: "One"
LayoutListItem {LI} at (40,18) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "2"
LayoutText {#text} at (0,0) size 29x18
text run at (0,0) width 29: "Two"
LayoutBlockFlow (anonymous) at (0,52) size 784x18
LayoutBR {BR} at (0,0) size 0x18
LayoutBlockFlow {BLOCKQUOTE} at (2,86) size 742x36 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x36
LayoutListItem {LI} at (40,0) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "3"
LayoutText {#text} at (0,0) size 38x18
text run at (0,0) width 38: "Three"
LayoutListItem {LI} at (40,18) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "4"
LayoutText {#text} at (0,0) size 31x18
text run at (0,0) width 31: "Four"
caret: position 0 of child 2 {BR} of child 3 {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 784x36
LayoutText {#text} at (0,0) size 781x36
text run at (0,0) width 486: "This tests to make sure that breaking a quoted list doesn't renumber the list. "
text run at (485,0) width 296: "You should see a list broken in two below, the"
text run at (0,18) width 681: "list items numbered 1, 2, 2, 3, 4. Two list items will be numbered '2' because the original item '2' was split."
LayoutBlockFlow {DIV} at (0,52) size 784x140
LayoutBlockFlow {BLOCKQUOTE} at (2,0) size 742x36 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x36
LayoutListItem {LI} at (40,0) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "1"
LayoutText {#text} at (0,0) size 27x18
text run at (0,0) width 27: "One"
LayoutListItem {LI} at (40,18) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "2"
LayoutText {#text} at (0,0) size 29x18
text run at (0,0) width 29: "Two"
LayoutBlockFlow (anonymous) at (0,52) size 784x18
LayoutBR {BR} at (0,0) size 0x18
LayoutBlockFlow {BLOCKQUOTE} at (2,86) size 742x54 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x54
LayoutListItem {LI} at (40,0) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "2"
LayoutText {#text} at (0,0) size 29x18
text run at (0,0) width 29: "Two"
LayoutListItem {LI} at (40,18) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "3"
LayoutText {#text} at (0,0) size 38x18
text run at (0,0) width 38: "Three"
LayoutListItem {LI} at (40,36) size 700x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "4"
LayoutText {#text} at (0,0) size 31x18
text run at (0,0) width 31: "Four"
caret: position 0 of child 2 {BR} of child 3 {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 784x40
LayoutText {#text} at (0,0) size 751x39
text run at (0,0) width 455: "This tests to make sure that breaking a quoted list doesn't renumber the list. "
text run at (455,0) width 296: "You should see a list broken in two below, the list"
text run at (0,20) width 159: "items numbered 1, 2, 3, 4."
LayoutBlockFlow {DIV} at (0,56) size 784x132
LayoutBlockFlow {BLOCKQUOTE} at (2,0) size 742x40 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x40
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
LayoutText {#text} at (0,0) size 26x19
text run at (0,0) width 26: "One"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
LayoutText {#text} at (0,0) size 27x19
text run at (0,0) width 27: "Two"
LayoutBlockFlow (anonymous) at (0,56) size 784x20
LayoutBR {BR} at (0,0) size 0x19
LayoutBlockFlow {BLOCKQUOTE} at (2,92) size 742x40 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x40
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "3"
LayoutText {#text} at (0,0) size 35x19
text run at (0,0) width 35: "Three"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "4"
LayoutText {#text} at (0,0) size 29x19
text run at (0,0) width 29: "Four"
caret: position 0 of child 2 {BR} of child 3 {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 784x40
LayoutText {#text} at (0,0) size 751x39
text run at (0,0) width 455: "This tests to make sure that breaking a quoted list doesn't renumber the list. "
text run at (455,0) width 296: "You should see a list broken in two below, the list"
text run at (0,20) width 615: "items numbered 1, 2, 2, 3, 4. Two list items will be numbered '2' because the original item '2' was split."
LayoutBlockFlow {DIV} at (0,56) size 784x152
LayoutBlockFlow {BLOCKQUOTE} at (2,0) size 742x40 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x40
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
LayoutText {#text} at (0,0) size 26x19
text run at (0,0) width 26: "One"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
LayoutText {#text} at (0,0) size 27x19
text run at (0,0) width 27: "Two"
LayoutBlockFlow (anonymous) at (0,56) size 784x20
LayoutBR {BR} at (0,0) size 0x19
LayoutBlockFlow {BLOCKQUOTE} at (2,92) size 742x60 [color=#0000FF] [border: none (2px solid #0000FF)]
LayoutBlockFlow {OL} at (2,0) size 740x60
LayoutListItem {LI} at (40,0) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "2"
LayoutText {#text} at (0,0) size 27x19
text run at (0,0) width 27: "Two"
LayoutListItem {LI} at (40,20) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "3"
LayoutText {#text} at (0,0) size 35x19
text run at (0,0) width 35: "Three"
LayoutListItem {LI} at (40,40) size 700x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "4"
LayoutText {#text} at (0,0) size 29x19
text run at (0,0) width 29: "Four"
caret: position 0 of child 2 {BR} of child 3 {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