blob: a8932adde6b686b5a04ae6ab173dd067d649aa92 [file]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
</style>
<script src="../../resources/js-test.js"></script>
<script src="../../resources/ui-helper.js"></script>
</head>
<body>
<input id="testInput" maxlength="10" />
<script>
description("Tests that input length limits use code units and not grapheme clusters.");
jsTestIsAsync = true;
async function runTest() {
testInput = document.getElementById("testInput");
await UIHelper.copyText("๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ");
await UIHelper.activateElementAndWaitForInputSession(testInput);
await UIHelper.paste();
shouldBeEqualToString("testInput.value", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€");
finishJSTest();
}
addEventListener("load", runTest);
</script>
</body>
</html>