| Index: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers.html
|
| diff --git a/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers.html b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1f7161b5f7fc218bbde995c214f069f775dcbcee
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers.html
|
| @@ -0,0 +1,86 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../assert_selection.js"></script>
|
| +<script src="spellcheck_test.js"></script>
|
| +
|
| +<script>
|
| + spellcheck_test(
|
| + '<div contenteditable>|zz. I have a issue.</div>',
|
| + '',
|
| + '<div contenteditable>#zz#. I have ~a~ issue.</div>',
|
| + {
|
| + title: 'Setup for the initial markers.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + document => document.querySelector('div').removeAttribute('contenteditable'),
|
| + '<div>zz. I have a issue.</div>',
|
| + 'Removing "contenteditable" attribute removes spelling markers.')
|
| + });
|
| +
|
| + spellcheck_test(
|
| + '<div contenteditable>|zz. I have a issue.</div>',
|
| + '',
|
| + '<div contenteditable>#zz#. I have ~a~ issue.</div>',
|
| + {
|
| + title: 'Setup for the initial markers.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + document => document.querySelector('div').setAttribute('contenteditable', 'false'),
|
| + '<div contenteditable="false">zz. I have a issue.</div>',
|
| + 'Setting "contenteditable" attribute to "false" removes spelling markers.')
|
| + });
|
| +
|
| + spellcheck_test(
|
| + '<div contenteditable id="parent"><div>|zz. I have a issue.</div></div>',
|
| + '',
|
| + '<div contenteditable id="parent"><div>#zz#. I have ~a~ issue.</div></div>',
|
| + {
|
| + title: 'Setup for the initial markers.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + document => document.getElementById('parent').removeAttribute('contenteditable'),
|
| + '<div id="parent"><div>zz. I have a issue.</div></div>',
|
| + 'Removing "contenteditable" attribute from parent removes spelling markers.')
|
| + });
|
| +
|
| + spellcheck_test(
|
| + '<div contenteditable id="parent"><div>|zz. I have a issue.</div></div>',
|
| + '',
|
| + '<div contenteditable id="parent"><div>#zz#. I have ~a~ issue.</div></div>',
|
| + {
|
| + title: 'Setup for the initial markers.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + document => document.getElementById('parent').setAttribute('contenteditable', 'false'),
|
| + '<div contenteditable="false" id="parent"><div>zz. I have a issue.</div></div>',
|
| + 'Setting "contenteditable" attribute to "false" on parent removes spelling markers.')
|
| + });
|
| +
|
| + spellcheck_test(
|
| + '<div contenteditable><div id="child">|zz. I have a issue.</div></div>',
|
| + '',
|
| + '<div contenteditable><div id="child">#zz#. I have ~a~ issue.</div></div>',
|
| + {
|
| + title: 'Setup for the initial markers.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + document => document.getElementById('child').setAttribute('contenteditable', 'false'),
|
| + '<div contenteditable><div contenteditable="false" id="child">zz. I have a issue.</div></div>',
|
| + 'Setting "contenteditable" attribute to "false" on child removes spelling markers.')
|
| + });
|
| +
|
| + spellcheck_test(
|
| + '<div contenteditable><div contenteditable id="child">|zz. I have a issue.</div></div>',
|
| + '',
|
| + '<div contenteditable><div contenteditable id="child">#zz#. I have ~a~ issue.</div></div>',
|
| + {
|
| + title: 'Setup for the initial markers.',
|
| + callback: sample => spellcheck_test(
|
| + sample,
|
| + document => document.getElementById('child').removeAttribute('contenteditable'),
|
| + '<div contenteditable><div id="child">#zz#. I have ~a~ issue.</div></div>',
|
| + 'Removing "contenteditable" attribute on child still keeps the spelling markers.')
|
| + });
|
| +
|
| +</script>
|
|
|