Commit 046716ca authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() in editing/deleting/delete-line-015.html

This patch changes "editing/deleting/delete-line-015.html" to utilize
|selection_test()| to avoid using unnecessary reference images for ease of
maintenance and enabling new features, e.g. EditingNG, high-DPI font, etc.

Bug: 679977
Change-Id: I21610ac3f25936f3bd0f9e651fa822848c0c8690
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2308556
Commit-Queue: Kent Tamura <tkent@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790251}
parent ab3dd662
<html>
<head>
<script src="../editing.js"></script>
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
function editingTest() {
extendSelectionForwardByLineCommand();
deleteCommand();
}
// This tests deletion of an empty line starting inside a <div> element,
// but ending outside that element (just before a <br>). If the deletion is
// successful, the result should have two lines, and the insertion point
// should be on the second line, at the end of the editable area.
selection_test(
[
'<div contenteditable>',
'<div>a</div><div>^<br></div>|<br>',
'</div>',
],
'Delete',
[
'<div contenteditable>',
'<div>a</div><div>|<br></div>',
'</div>',
],
'Delete an empty line starting inside a <div>');
</script>
</head>
<body>
<p>This tests deletion of an empty line starting inside a &lt;div&gt; element,
but ending outside that element (just before a &lt;br&gt;). If the deletion is
successful, the result should have two lines, and the insertion point
should be on the second line, at the end of the editable area.</p>
<div contenteditable>
<div>a</div><div id="test"><br></div><br>
</div>
</body>
<script>runEditingTest()</script>
</html>
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x584
LayoutBlockFlow {P} at (0,0) size 784x60
LayoutText {#text} at (0,0) size 778x59
text run at (0,0) width 764: "This tests deletion of an empty line starting inside a <div> element, but ending outside that element (just before a <br>). If"
text run at (0,20) width 778: "the deletion is successful, the result should have two lines, and the insertion point should be on the second line, at the end of"
text run at (0,40) width 106: "the editable area."
LayoutBlockFlow {DIV} at (0,76) size 784x40
LayoutBlockFlow {DIV} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 7x19
text run at (0,0) width 7: "a"
LayoutBlockFlow {DIV} at (0,20) size 784x20
LayoutBR {BR} at (0,0) size 0x19
caret: position 0 of child 0 {BR} of child 2 {DIV} of child 3 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x584
LayoutBlockFlow {P} at (0,0) size 784x54
LayoutText {#text} at (0,0) size 784x54
text run at (0,0) width 784: "This tests deletion of an empty line starting inside a <div> element, but ending outside that element (just before a <br>). If"
text run at (0,18) width 778: "the deletion is successful, the result should have two lines, and the insertion point should be on the second line, at the end"
text run at (0,36) width 127: "of the editable area."
LayoutBlockFlow {DIV} at (0,70) size 784x36
LayoutBlockFlow {DIV} at (0,0) size 784x18
LayoutText {#text} at (0,0) size 8x18
text run at (0,0) width 8: "a"
LayoutBlockFlow {DIV} at (0,18) size 784x18
LayoutBR {BR} at (0,0) size 0x18
caret: position 0 of child 0 {BR} of child 2 {DIV} of child 3 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x584
LayoutBlockFlow {P} at (0,0) size 784x60
LayoutText {#text} at (0,0) size 748x59
text run at (0,0) width 748: "This tests deletion of an empty line starting inside a <div> element, but ending outside that element (just before a <br>). If the"
text run at (0,20) width 737: "deletion is successful, the result should have two lines, and the insertion point should be on the second line, at the end of the"
text run at (0,40) width 81: "editable area."
LayoutBlockFlow {DIV} at (0,76) size 784x40
LayoutBlockFlow {DIV} at (0,0) size 784x20
LayoutText {#text} at (0,0) size 7x19
text run at (0,0) width 7: "a"
LayoutBlockFlow {DIV} at (0,20) size 784x20
LayoutBR {BR} at (0,0) size 0x19
caret: position 0 of child 0 {BR} of child 2 {DIV} 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