Commit 816a2baf authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() for "editing/execCommand/align-in-span.html"

This patch changes "align-in-span.html" to utilize |selection_test()| for ease
of maintenance.

Note: "align-in-span.html" is failed on layout_ng bot due by newline difference.

Bug: 679977, 636993
Change-Id: If2459543969e992b198a2f5275b590f8bce1917f
Reviewed-on: https://chromium-review.googlesource.com/991624Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547890}
parent 09fed68f
Line 1.
Select all text in this line and use justify command.
Line 3.
<html>
<head>
<script type="text/javascript">
function selectAndJustify()
{
if (window.testRunner)
testRunner.dumpAsText();
var elem = document.getElementById("test");
var selection = window.getSelection();
selection.setBaseAndExtent(elem, 2, elem, 6);
document.execCommand('JustifyCenter', false, null);
}
</script>
</head>
<body>
<span id="test" contenteditable="true" >
Line 1.
<br>
<b>Select all text in this line and use justify command.</b>
<br>
Line 3.
</span>
</body>
<!doctype HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
selectAndJustify();
selection_test(
[
'<span contenteditable>',
'ab<br>',
'^<b>CD</b><br>|',
'de',
'</span>'
],
'justifyCenter',
[
'<span contenteditable>',
'ab<br>',
'<div style="text-align: center;"><b>^CD</b></div>',
'<div style="text-align: center;">|de</div>',
'</span>',
],
'justifyCenter in SPAN');
</script>
</html>
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