Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers-disabled-readonly.html

Issue 2669213002: Remove spelling markers in disabled and readonly form elements
Patch Set: Use setNeedsWillValidateCheck() to avoid crashes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers-disabled-readonly.html
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers-disabled-readonly.html b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers-disabled-readonly.html
new file mode 100644
index 0000000000000000000000000000000000000000..d26dc2688c38ca0536f05fbb2fa7686eb48eb78b
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/spelling/spellcheck-remove-markers-disabled-readonly.html
@@ -0,0 +1,60 @@
+<!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(
+ '<textarea>|zz. I have a issue.</textarea>',
+ '',
+ '<textarea>#zz#. I have ~a~ issue.</textarea>',
+ {
+ title: '1) Setup for the initial markers.',
+ callback: sample => spellcheck_test(
+ sample,
+ document => document.querySelector('textarea').setAttribute('disabled', 'true'),
+ '<textarea disabled="true">zz. I have a issue.</textarea>',
+ 'Set "disabled" attribute on <textarea> removes spelling markers.')
+ });
+
+ spellcheck_test(
+ '<input value="zz. I have a issue.">',
+ document => document.querySelector('input').focus(),
+ '<input value="#zz#. I have ~a~ issue.">',
+ {
+ title: '2) Setup for the initial markers.',
+ callback: sample => spellcheck_test(
+ sample,
+ document => document.querySelector('input').setAttribute('disabled', 'true'),
+ '<input disabled="true" value="zz. I have a issue.">',
+ 'Set "disabled" attribute on <input> removes spelling markers.')
+ });
+
+ spellcheck_test(
+ '<textarea>|zz. I have a issue.</textarea>',
+ '',
+ '<textarea>#zz#. I have ~a~ issue.</textarea>',
+ {
+ title: '3) Setup for the initial markers.',
+ callback: sample => spellcheck_test(
+ sample,
+ document => document.querySelector('textarea').setAttribute('readonly', 'true'),
+ '<textarea readonly="true">zz. I have a issue.</textarea>',
+ 'Set "readonly" attribute on <textarea> removes spelling markers.')
+ });
+
+ spellcheck_test(
+ '<input value="zz. I have a issue.">',
+ document => document.querySelector('input').focus(),
+ '<input value="#zz#. I have ~a~ issue.">',
+ {
+ title: '4) Setup for the initial markers.',
+ callback: sample => spellcheck_test(
+ sample,
+ document => document.querySelector('input').setAttribute('readonly', 'true'),
+ '<input readonly="true" value="zz. I have a issue.">',
+ 'Set "readonly" attribute on <input> removes spelling markers.')
+ });
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698