Commit 2ea53090 authored by yosin's avatar yosin Committed by Commit bot

Convert editing/insert-3778059-fix.html to use w3c test harness

This patch converts "editing/insert-3778059-fix.html" to use w3c test
harness to simplify test script and renames to "insert_between_block_quote.html"
to provide to provide a hint what this test script verifies, for improving
readability.

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

Review-Url: https://codereview.chromium.org/2280533003
Cr-Commit-Position: refs/heads/master@{#414361}
parent b0b6d8bd
<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() {
for (i = 0; i < 5; i++)
moveSelectionForwardByCharacterCommand();
typeCharacterCommand();
}
</script>
<title>Editing Test</title>
</head>
<body>
<div contenteditable id="root" class="editing">
<div id="test">
<BLOCKQUOTE>Test</BLOCKQUOTE>
<BR>
<BLOCKQUOTE>Test</BLOCKQUOTE>
</div>
</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>
<div id="log"></div>
<script>
test(() => assert_selection(
[
'<div contenteditable>',
'<blockquote>foo</blockquote>',
'|<br>',
'<blockquote>bar</blockquote>',
'</div>',
].join(''),
'insertText baz',
[
'<div contenteditable>',
'<blockquote>foo</blockquote>',
'baz|<br>',
'<blockquote>bar</blockquote>',
'</div>',
].join('')),
'insert text betwen BLOCKQUOTE');
</script>
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x208 [border: (2px solid #FF0000)]
LayoutBlockFlow {DIV} at (14,38) size 756x132
LayoutBlockFlow {BLOCKQUOTE} at (40,0) size 676x28
LayoutText {#text} at (0,0) size 40x27
text run at (0,0) width 40: "Test"
LayoutBlockFlow (anonymous) at (0,52) size 756x28
LayoutText {#text} at (0,0) size 12x27
text run at (0,0) width 12: "x"
LayoutBR {BR} at (12,21) size 0x0
LayoutBlockFlow {BLOCKQUOTE} at (40,104) size 676x28
LayoutText {#text} at (0,0) size 40x27
text run at (0,0) width 40: "Test"
caret: position 1 of child 3 {#text} of child 1 {DIV} of child 1 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x208 [border: (2px solid #FF0000)]
LayoutBlockFlow {DIV} at (14,38) size 756x132
LayoutBlockFlow {BLOCKQUOTE} at (40,0) size 676x28
LayoutText {#text} at (0,0) size 40x28
text run at (0,0) width 40: "Test"
LayoutBlockFlow (anonymous) at (0,52) size 756x28
LayoutText {#text} at (0,0) size 12x28
text run at (0,0) width 12: "x"
LayoutBR {BR} at (12,22) size 0x0
LayoutBlockFlow {BLOCKQUOTE} at (40,104) size 676x28
LayoutText {#text} at (0,0) size 40x28
text run at (0,0) width 40: "Test"
caret: position 1 of child 3 {#text} of child 1 {DIV} of child 1 {DIV} of body
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
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 784x205 [border: (2px solid #FF0000)]
LayoutBlockFlow {DIV} at (14,38) size 756x129
LayoutBlockFlow {BLOCKQUOTE} at (40,0) size 676x27
LayoutText {#text} at (0,0) size 40x26
text run at (0,0) width 40: "Test"
LayoutBlockFlow (anonymous) at (0,51) size 756x27
LayoutText {#text} at (0,0) size 12x26
text run at (0,0) width 12: "x"
LayoutBR {BR} at (12,21) size 0x0
LayoutBlockFlow {BLOCKQUOTE} at (40,102) size 676x27
LayoutText {#text} at (0,0) size 40x26
text run at (0,0) width 40: "Test"
caret: position 1 of child 3 {#text} of child 1 {DIV} 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