diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/forms/constraints/input-maxlength-emoji.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/forms/constraints/input-maxlength-emoji.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/forms/constraints/input-maxlength-emoji.html b/testing/web-platform/tests/html/semantics/forms/constraints/input-maxlength-emoji.html new file mode 100644 index 0000000000..068abad936 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/forms/constraints/input-maxlength-emoji.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Tests pasting an emoji in a text field with a maxlength attribute</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<link rel="help" href="https://bugs.webkit.org/show_bug.cgi?id=252900"> +<input id="target" type="text" maxlength="10" /> +<script> +test(function() { + let target = document.getElementById("target"); + target.focus(); + document.execCommand("InsertHTML", false, "๐จโ๐ฉโ๐งโ๐ฆ"); + assert_equals(target.value, "๐จโ๐ฉโ๐งโ"); +}, "Emoji gets truncated due to maxlength attribute"); +</script> |