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

Utilize selection_test() in editing/execCommand/format-block-with-trailing-br.html

This patch changes "format-block-with-trailing-br.html" to utilize
|selection_test()| for ease of maintenance and help to implementing EditingNG.

Bug: 707656, 679977
Change-Id: I386ca10eb56a820cf9b7e2ee140016ab17043733
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2214458
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771495}
parent aee1785a
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script> <script>
if (window.testRunner) { selection_test(
testRunner.dumpEditingCallbacks(); '<div contenteditable><div>|abc<br></div></div>',
testRunner.dumpAsLayoutWithPixelResults(); 'FormatBlock pre',
} '<div contenteditable><pre>|abc</pre></div>');
</script>
<div style="border:1px solid black" contenteditable="true">
<div id="item1">Foo<br></div>
</div>
<script>
var s = window.getSelection();
var p1 = document.getElementById("item1");
s.collapse(p1, 0);
document.execCommand("FormatBlock", false, "pre");
</script> </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 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x43 [border: (1px solid #000000)]
LayoutBlockFlow {PRE} at (1,14) size 782x15
LayoutText {#text} at (0,0) size 24x15
text run at (0,0) width 24: "Foo"
caret: position 0 of child 0 {#text} of child 1 {PRE} of child 0 {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 784x584
LayoutBlockFlow {DIV} at (0,0) size 784x44 [border: (1px solid #000000)]
LayoutBlockFlow {PRE} at (1,14) size 782x16
LayoutText {#text} at (0,0) size 24x16
text run at (0,0) width 24: "Foo"
caret: position 0 of child 0 {#text} of child 1 {PRE} of child 0 {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