Files
sousa-gecko/editor/spellchecker/tests/test_bug1602526.html
T
Mark Banner 7c7e102a02 Bug 1924775 - Remove some cases of ESLint rule no-undef being disabled. r=devtools-reviewers,hsohaney,nchevobbe
These are generally cases where the exclusion is no longer necessary, because we've fixed whatever was causing it to be added in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D300083
2026-05-21 07:45:43 +00:00

56 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Mozilla bug 1602526</title>
<link rel=stylesheet href="/tests/SimpleTest/test.css">
<script src="/tests/SimpleTest/EventUtils.js"></script>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/editor/spellchecker/tests/spellcheck.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1602526">Mozilla Bug 1602526</a>
<p id="display"></p>
<div id="content" style="display: none;">
</div>
<div id="contenteditable" contenteditable=true>kkkk&#xf6;kkkk</div>
<script>
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
);
SimpleTest.waitForExplicitFinish();
function getEditor() {
return SpecialPowers.wrap(window).docShell.editor;
}
SimpleTest.waitForFocus(async () => {
let contenteditable = document.getElementById("contenteditable");
let misspeltWords = [];
misspeltWords.push("kkkk\u00f6kkkk");
contenteditable.focus();
window.getSelection().collapse(contenteditable.firstChild, contenteditable.firstChild.length);
synthesizeKey(" ");
// Run spell checker
await new Promise((resolve) => { maybeOnSpellCheck(contenteditable, resolve); });
synthesizeKey("a");
synthesizeKey("a");
synthesizeKey("a");
await new Promise((resolve) => { maybeOnSpellCheck(contenteditable, resolve); });
let editor = getEditor();
ok(isSpellingCheckOk(editor, misspeltWords), "correct word is seleced as misspell");
SimpleTest.finish();
});
</script>
</body>
</html>