Commit 5b5fc338 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

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

This patch changes "editing/deleting/delete-line-017.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: I2c2dd53c870a03f7b109ee5fa743e0c692019084
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309490
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790265}
parent 4564002d
<html> <!doctype html>
<script src="../../resources/testharness.js"></script>
<head> <script src="../../resources/testharnessreport.js"></script>
<script src="../editing.js"></script> <script src="../assert_selection.js"></script>
<script> <script>
function editingTest() { // This tests deletion of an empty line which is a <br> element just after a
moveSelectionForwardByLineCommand(); // <div> element. If the deletion is successful, the result should have two
extendSelectionForwardByLineCommand(); // lines, and the insertion point should be at the start of the second line,
deleteCommand(); // just before the letter "b".
} selection_test(
[
'<div contenteditable>',
'<div>a</div>^<br><div>|b</div>',
'</div>',
],
'Delete',
[
'<div contenteditable>',
'<div>a</div><div>|b</div>',
'</div>',
],
'Delete an empty line; selecting <br> only');
</script> </script>
</head>
<body>
<p>This tests deletion of an empty line which is a &lt;br&gt; element just after
a &lt;div&gt; element. If the deletion is successful, the result should have two lines,
and the insertion point should be at the start of the second line, just before the letter "b".</p>
<div contenteditable>
<div id="test">a</div><br><div>b</div>
</div>
</body>
<script>runEditingTest()</script>
</html>
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x40
LayoutText {#text} at (0,0) size 781x39
text run at (0,0) width 781: "This tests deletion of an empty line which is a <br> element just after a <div> element. If the deletion is successful, the result"
text run at (0,20) width 695: "should have two lines, and the insertion point should be at the start of the second line, just before the letter \"b\"."
LayoutBlockFlow {DIV} at (0,56) 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
LayoutText {#text} at (0,0) size 8x19
text run at (0,0) width 8: "b"
caret: position 0 of child 0 {#text} of child 2 {DIV} of child 3 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x36
LayoutText {#text} at (0,0) size 763x36
text run at (0,0) width 763: "This tests deletion of an empty line which is a <br> element just after a <div> element. If the deletion is successful, the"
text run at (0,18) width 750: "result should have two lines, and the insertion point should be at the start of the second line, just before the letter \"b\"."
LayoutBlockFlow {DIV} at (0,52) 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
LayoutText {#text} at (0,0) size 8x18
text run at (0,0) width 8: "b"
caret: position 0 of child 0 {#text} of child 2 {DIV} of child 3 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x40
LayoutText {#text} at (0,0) size 783x39
text run at (0,0) width 783: "This tests deletion of an empty line which is a <br> element just after a <div> element. If the deletion is successful, the result should"
text run at (0,20) width 617: "have two lines, and the insertion point should be at the start of the second line, just before the letter \"b\"."
LayoutBlockFlow {DIV} at (0,56) 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
LayoutText {#text} at (0,0) size 8x19
text run at (0,0) width 8: "b"
caret: position 0 of child 0 {#text} 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