| Index: third_party/WebKit/LayoutTests/editing/style/apply_style_with_unfocused_selection.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/style/apply_style_with_unfocused_selection.html b/third_party/WebKit/LayoutTests/editing/style/apply_style_with_unfocused_selection.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fc28532a886a9f25390a139dde3e7b3e8346952c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/style/apply_style_with_unfocused_selection.html
|
| @@ -0,0 +1,25 @@
|
| +<!doctype html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<script>
|
| +test(() => {
|
| + assert_exists(window, 'eventSender', 'This test requires eventSender');
|
| +
|
| + assert_selection(
|
| + [
|
| + '<div contenteditable>^text|</div>',
|
| + '<a href="http://www.example.com/">link</a>'
|
| + ].join(''),
|
| + selection => {
|
| + const link = selection.document.querySelector('a');
|
| + link.focus();
|
| + eventSender.keyDown('b', ['ctrlKey']);
|
| + assert_equals(selection.document.activeElement, link);
|
| + },
|
| + [
|
| + '<div contenteditable>^text|</div>',
|
| + '<a href="http://www.example.com/">link</a>'
|
| + ].join(''));
|
| +}, 'Styling with unfocused selection in contenteditable div');
|
| +</script>
|
|
|