Commit 18a4143b authored by yosin's avatar yosin Committed by Commit bot

Convert editing/deleting/delete-4083333-fix.html to use w3c test harness

This patch converts "editing/deleting/delete-4083333-fix.html" to
use w3c test harness to simplify test script for improving readability., and
renames to "delete_link_at_end_of_sentence.html" to provide hint about what this
test script verifies.

BUG=n/a
TEST=n/a; no behavior changes

Review-Url: https://codereview.chromium.org/2255733002
Cr-Commit-Position: refs/heads/master@{#412742}
parent e66c53c6
<html>
<head>
<style>
.editing {
border: 2px solid red;
padding: 12px;
font-size: 24px;
}
</style>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function editingTest() {
moveSelectionForwardByLineCommand();
deleteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body>
<div contenteditable id="root" class="editing">
<span id="test">this is a <A href="www.apple.com">link</A></span>
</div>
<script>
runEditingTest();
</script>
</body>
</html>
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
[
'<div contenteditable>',
'<span>this is a <a href="foo">link|</a></span>',
'</div>',
].join(''),
'delete',
[
'<div contenteditable>',
'<span>this is a <a href="foo">lin|</a></span>',,
'</div>',
].join('')),
'Delete command should not delete A element');
</script>
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 {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
LayoutInline {SPAN} at (0,0) size 102x27
LayoutText {#text} at (14,14) size 78x27
text run at (14,14) width 78: "this is a "
LayoutInline {A} at (0,0) size 24x27 [color=#0000EE]
LayoutText {#text} at (92,14) size 24x27
text run at (92,14) width 24: "lin"
caret: position 3 of child 0 {#text} of child 1 {A} of child 1 {SPAN} of child 1 {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 {DIV} at (0,0) size 784x56 [border: (2px solid #FF0000)]
LayoutInline {SPAN} at (0,0) size 105x28
LayoutText {#text} at (14,14) size 80x28
text run at (14,14) width 80: "this is a "
LayoutInline {A} at (0,0) size 26x28 [color=#0000EE]
LayoutText {#text} at (93,14) size 26x28
text run at (93,14) width 26: "lin"
caret: position 3 of child 0 {#text} of child 1 {A} of child 1 {SPAN} of child 1 {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 {DIV} at (0,0) size 784x55 [border: (2px solid #FF0000)]
LayoutInline {SPAN} at (0,0) size 105x26
LayoutText {#text} at (14,14) size 80x26
text run at (14,14) width 80: "this is a "
LayoutInline {A} at (0,0) size 26x26 [color=#0000EE]
LayoutText {#text} at (93,14) size 26x26
text run at (93,14) width 26: "lin"
caret: position 3 of child 0 {#text} of child 1 {A} of child 1 {SPAN} of child 1 {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