summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html')
-rw-r--r--testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html b/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html
new file mode 100644
index 0000000000..9f00f1dff1
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/editing-0/spelling-and-grammar-checking/spellcheck-enumerated-ascii-case-insensitive.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="help" href="https://html.spec.whatwg.org/#attr-spellcheck">
+<link rel="help" href="https://html.spec.whatwg.org/#enumerated-attribute">
+<meta name="assert" content="@spellcheck values are ASCII case-insensitive">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<!--
+ While <div> and <span> aren’t defined as “checkable for the purposes of this
+ feature”, this has no effect on the attribute’s state.
+
+ We wrap the <span> elements under test with <div> elements so the checking
+ enabled algorithm stops at step 4 (ancestor content attribute), before steps
+ relying on user-agent-defined behavior (see [#concept-spellcheck-default]).
+-->
+<div spellcheck="true"><span spellcheck="false"></span></div>
+<div spellcheck="true"><span spellcheck="FaLsE"></span></div>
+<div spellcheck="true"><span spellcheck="falſe"></span></div>
+<script>
+const span = document.querySelectorAll("span");
+
+test(() => {
+ assert_equals(span[0].spellcheck, false, "lowercase valid");
+ assert_equals(span[1].spellcheck, false, "mixed case valid");
+ assert_equals(span[2].spellcheck, true, "non-ASCII invalid");
+}, "keyword false");
+</script>