Commit 7c3b5377 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() for "editing/execCommand/remove-list-from-range-selection.html"

This patch changes "remove-list-from-range-selection.html" to utilize
|selection_test()| for ease of maintenance.

Note: "remove-list-from-range-selection.html" is failed on layout_ng bot
du by pixel test.

Bug: 679977, 636993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I1c3257701ae53ceacbb651ca544925d982a30e5d
Reviewed-on: https://chromium-review.googlesource.com/991625
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarYoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547989}
parent 98199e90
......@@ -215,7 +215,6 @@ crbug.com/591099 editing/execCommand/findString.html [ Failure ]
crbug.com/591099 editing/execCommand/format-block-multiple-paragraphs-in-pre.html [ Failure ]
crbug.com/591099 editing/execCommand/format-block-multiple-paragraphs.html [ Failure ]
crbug.com/591099 editing/execCommand/query-format-block.html [ Pass Timeout ]
crbug.com/591099 editing/execCommand/remove-list-from-range-selection.html [ Failure ]
crbug.com/591099 editing/inserting/4875189-1.html [ Failure ]
crbug.com/591099 editing/inserting/4959067.html [ Failure ]
crbug.com/591099 editing/inserting/editable-inline-element.html [ Failure ]
......
<!doctype HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
if (window.testRunner)
testRunner.dumpEditingCallbacks();
</script>
<p>This tests Insert{Un}OrderedList on a range selection that is entirely within one list.</p>
<div id="test" contenteditable="true"><ol><li><span id="start">None of the</span></li><li>selected content</li><li>should be</li><li><span id="end">in a list.</span></li></ol><ol><li>This should be in a list and should not be selected.</li></ol></div>
<script>
var s = window.getSelection();
var start = document.getElementById("start").firstChild;
var end = document.getElementById("end").firstChild;
s.setBaseAndExtent(start, 2, end, 2);
document.execCommand("InsertOrderedList", false, "foo");
// This tests Insert{Un}OrderedList on a range selection that is entirely within
// one list.
selection_test(
[
'<div contenteditable>',
'<ol>',
'<li><span>a^B</span></li>',
'<li>CD</li>',
'<li>EF</li>',
'<li><span>G|h</span></li>',
'</ol>',
'<ol><li>ij</li></ol>',
'</div>',
],
'insertOrderedList',
[
'<div contenteditable>',
'a^B<br>CD<br>EF<br>G|h<br>',
'<ol><li>ij</li></ol>',
'</div>',
],
'Remove list from range selection');
</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 784x576
LayoutBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 528x19
text run at (0,0) width 528: "This tests Insert{Un}OrderedList on a range selection that is entirely within one list."
LayoutBlockFlow {DIV} at (0,36) size 784x116
LayoutBlockFlow (anonymous) at (0,0) size 784x80
LayoutText {#text} at (0,0) size 75x19
text run at (0,0) width 75: "None of the"
LayoutBR {BR} at (75,15) size 0x0
LayoutText {#text} at (0,20) size 100x19
text run at (0,20) width 100: "selected content"
LayoutBR {BR} at (100,35) size 0x0
LayoutText {#text} at (0,40) size 61x19
text run at (0,40) width 61: "should be"
LayoutBR {BR} at (61,55) size 0x0
LayoutText {#text} at (0,60) size 49x19
text run at (0,60) width 49: "in a list."
LayoutBR {BR} at (49,75) size 0x0
LayoutBlockFlow {OL} at (0,96) size 784x20
LayoutListItem {LI} at (40,0) size 744x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
LayoutText {#text} at (0,0) size 316x19
text run at (0,0) width 316: "This should be in a list and should not be selected."
selection start: position 2 of child 0 {#text} of child 2 {DIV} of body
selection end: position 2 of child 6 {#text} 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 784x576
LayoutBlockFlow {P} at (0,0) size 784x18
LayoutText {#text} at (0,0) size 541x18
text run at (0,0) width 541: "This tests Insert{Un}OrderedList on a range selection that is entirely within one list."
LayoutBlockFlow {DIV} at (0,34) size 784x106
LayoutBlockFlow (anonymous) at (0,0) size 784x72
LayoutText {#text} at (0,0) size 76x18
text run at (0,0) width 76: "None of the"
LayoutBR {BR} at (75,14) size 1x0
LayoutText {#text} at (0,18) size 103x18
text run at (0,18) width 103: "selected content"
LayoutBR {BR} at (102,32) size 1x0
LayoutText {#text} at (0,36) size 62x18
text run at (0,36) width 62: "should be"
LayoutBR {BR} at (61,50) size 1x0
LayoutText {#text} at (0,54) size 52x18
text run at (0,54) width 52: "in a list."
LayoutBR {BR} at (51,68) size 1x0
LayoutBlockFlow {OL} at (0,88) size 784x18
LayoutListItem {LI} at (40,0) size 744x18
LayoutListMarker (anonymous) at (-16,0) size 16x18: "1"
LayoutText {#text} at (0,0) size 323x18
text run at (0,0) width 323: "This should be in a list and should not be selected."
selection start: position 2 of child 0 {#text} of child 2 {DIV} of body
selection end: position 2 of child 6 {#text} 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 784x576
LayoutBlockFlow {P} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 499x19
text run at (0,0) width 499: "This tests Insert{Un}OrderedList on a range selection that is entirely within one list."
LayoutBlockFlow {DIV} at (0,36) size 784x116
LayoutBlockFlow (anonymous) at (0,0) size 784x80
LayoutText {#text} at (0,0) size 72x19
text run at (0,0) width 72: "None of the"
LayoutBR {BR} at (72,15) size 0x0
LayoutText {#text} at (0,20) size 97x19
text run at (0,20) width 97: "selected content"
LayoutBR {BR} at (97,35) size 0x0
LayoutText {#text} at (0,40) size 58x19
text run at (0,40) width 58: "should be"
LayoutBR {BR} at (58,55) size 0x0
LayoutText {#text} at (0,60) size 45x19
text run at (0,60) width 45: "in a list."
LayoutBR {BR} at (45,75) size 0x0
LayoutBlockFlow {OL} at (0,96) size 784x20
LayoutListItem {LI} at (40,0) size 744x20
LayoutListMarker (anonymous) at (-16,0) size 16x19: "1"
LayoutText {#text} at (0,0) size 300x19
text run at (0,0) width 300: "This should be in a list and should not be selected."
selection start: position 2 of child 0 {#text} of child 2 {DIV} of body
selection end: position 2 of child 6 {#text} 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