| Index: third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html b/third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fa2ef989ba2d099d46ae1eee92107c475b9cbcc6
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/style/apply_style_to_plaintext_only.html
|
| @@ -0,0 +1,61 @@
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<script>
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<div>^foo</div>',
|
| + '<table contenteditable="false">',
|
| + '<tr>',
|
| + '<td>non-editable</td>',
|
| + '<td contenteditable="plaintext-only">plaintext-only</td>',
|
| + '</tr>',
|
| + '</table>|',
|
| + '</div>'
|
| + ].join(''),
|
| + 'bold',
|
| + [
|
| + '<div contenteditable>',
|
| + '<div><b>^foo</b></div>',
|
| + '<table contenteditable="false">',
|
| + '<tbody><tr>',
|
| + '<td>non-editable</td>',
|
| + '<td contenteditable="plaintext-only" style="font-weight: bold;">plaintext-only</td>',
|
| + '</tr></tbody>',
|
| + '</table>|',
|
| + '</div>'
|
| + ].join('')),
|
| + 'Plaintext-only regions can be styled as long as they are fully selected.');
|
| +
|
| +test(() => assert_selection(
|
| + [
|
| + '<div contenteditable>',
|
| + '<div>^foo</div>',
|
| + '<table contenteditable="false">',
|
| + '<tr>',
|
| + '<td>non-editable</td>',
|
| + '<td contenteditable="plaintext-only">',
|
| + '<span>plaintext|</span>-only',
|
| + '</td>',
|
| + '</tr>',
|
| + '</table>',
|
| + '</div>'
|
| + ].join(''),
|
| + 'bold',
|
| + [
|
| + '<div contenteditable>',
|
| + '<div><b>^foo</b></div>',
|
| + '<table contenteditable="false">',
|
| + '<tbody><tr>',
|
| + '<td>non-editable</td>',
|
| + '<td contenteditable="plaintext-only">',
|
| + '<span>plaintext|</span>-only',
|
| + '</td>',
|
| + '</tr></tbody>',
|
| + '</table>',
|
| + '</div>'
|
| + ].join('')),
|
| + 'Plaintext-only regions are not styled if they are not fully selected.');
|
| +</script>
|
|
|