Commit 0b52638e authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() in editing/editing/style/4916887.html

This patch changes "4916887.html" to utilize |selection_test()| and renames to
"color_of_indented_text.html" for ease of maintenance and help to implementing
EditingNG.

Bug: 707656, 679977
Change-Id: I97c3a41130d62af6b4255fd161d9f21aaeccb5a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212239
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771475}
parent 6d469c06
<p>This tests for a bug where the color of indented text couldn't be changed.</p>
<div id="div" contenteditable="true"><br></div>
<script>
var div = document.getElementById("div");
div.focus();
document.execCommand("InsertText", false, "This text should be blue.");
document.execCommand("SelectAll");
document.execCommand("ForeColor", false, "red");
document.execCommand("Indent");
document.execCommand("ForeColor", false, "blue");
</script>
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// This tests for a bug where the color of indented text couldn't be changed.
const kIndentStyle = 'margin: 0 0 0 40px; border: none; padding: 0px;';
selection_test(
[
'<div contenteditable>',
`<blockquote style="${kIndentStyle}">`,
'^<font color="#ff0000">This text should be blue.</font>|',
'</blockquote>',
'</div>',
],
'ForeColor blue',
[
'<div contenteditable>',
`<blockquote style="${kIndentStyle}">`,
'<font color="#0000ff">^This text should be blue.|</font>',
'</blockquote>',
'</div>',
]);
</script>
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