Commit e1dd4ebc authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Utilize selection_test() in editing/editing/style/font-family-with-space.html

This patch changes font-family-with-space.html" to utilize |selection_test()|
for ease of maintenance and help to implementing EditingNG.

Bug: 707656, 679977
Change-Id: I1dc4ec92ce7aeb3b095f9854a2a1699bb3fa9dba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212196
Auto-Submit: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771486}
parent e394070d
<html style="font-family: Arial; font-size: 13px;">
<body contenteditable="true" style="font-family: 'Times New Roman'; font-weight: bold;">This text should be Times New Roman bold.</body>
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
document.body.focus();
document.execCommand("SelectAll");
document.execCommand("Underline");
document.execCommand("Copy");
window.getSelection().modify("move", "forward", "character");
document.execCommand("Paste");
const kStyle = 'font-family: &apos;Times New Roman&apos;; font-weight: bold;';
selection_test(
[
`<div contenteditable style="${kStyle}">`,
'<div><u>^abc|</u></div>',
'</div>',
],
selection => {
if (!window.testRunner)
throw 'This test requires testRunner.';
selection.document.documentElement.setAttribute('style',
'font-family: Arial; font-size: 13px;');
selection.document.execCommand('Copy');
selection.modify('move', 'forward', 'character'),
selection.document.execCommand('Paste');
},
[
`<div contenteditable style="${kStyle}">`,
'<div><u>abc</u><u>abc|</u></div>',
'</div>',
]);
</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