summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-007.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-007.html')
-rw-r--r--testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-007.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-007.html b/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-007.html
new file mode 100644
index 0000000000..31b3755f3a
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spelling-markers-007.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html lang="en">
+<meta charset="utf-8">
+<title>Turning off spellcheck by making textareas readonly</title>
+<link rel=match href="references/spelling-markers-001-ref.html">
+<link rel=help href="https://html.spec.whatwg.org/multipage/interaction.html#spelling-and-grammar-checking">
+<meta name=assert content="Spellchecking stops applying to textareas when they become readonly">
+
+<style>
+#test {
+ /* Match the ref */
+ all: initial;
+ width: 100%;
+ display: block;
+ font-family: inherit;
+}
+</style>
+
+<textarea id=test>This test passes if there is no visual marker indicating the spellinnnnnggg mistake in this sentence, and fails otherwise.</textarea>
+
+<script>
+ var test = document.getElementById("test");
+ // Force spellcheck by focus then blur
+ test.focus();
+ test.blur();
+ test.setAttribute("readonly", true);
+</script>