mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1843794 - Rewrite editor/AsyncSpellCheckTestHelper.sys.mjs consumers in html/xhtml to use ChromeUtils.importESModule. r=masayuki
Depends on D183689 Differential Revision: https://phabricator.services.mozilla.com/D183690
This commit is contained in:
parent
d32481d262
commit
d984b79117
@ -7,8 +7,8 @@ function load()
|
||||
let textarea = document.getElementById("editor");
|
||||
textarea.focus();
|
||||
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://reftest/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://reftest/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(textarea, () => {
|
||||
let isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
|
||||
|
@ -72,8 +72,8 @@ SimpleTest.waitForFocus(async () => {
|
||||
let inlineSpellchecker = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(true);
|
||||
textarea.value = "abx ";
|
||||
await new Promise(resolve => {
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(textarea, () => {
|
||||
SimpleTest.executeSoon(resolve);
|
||||
|
@ -93,8 +93,8 @@ SimpleTest.waitForFocus(async () => {
|
||||
return aElement === textarea ? aElement.value : aElement.innerHTML;
|
||||
}
|
||||
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(aElement, () => {
|
||||
SimpleTest.executeSoon(() => {
|
||||
|
@ -24,8 +24,8 @@ function start() {
|
||||
var textarea = document.getElementById("editor");
|
||||
textarea.focus();
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
)
|
||||
onSpellCheck(textarea, function() {
|
||||
var isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
|
||||
|
@ -23,8 +23,8 @@ fivee sixx<br>
|
||||
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
/** Test for Bug 1100966 **/
|
||||
|
@ -22,8 +22,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1154791
|
||||
|
||||
<script class="testbody" type="application/javascript">
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
/** Test for Bug 1154791 **/
|
||||
|
@ -106,8 +106,8 @@ function continueTest(evt) {
|
||||
var inlineSpellChecker = editor.getInlineSpellChecker(true);
|
||||
const is_en_US = SpecialPowers.Services.locale.appLocaleAsBCP47 == "en-US";
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(elem, async function() {
|
||||
var spellchecker = inlineSpellChecker.spellChecker;
|
||||
|
@ -69,8 +69,8 @@ var loadListener = async function(evt) {
|
||||
editor.setSpellcheckUserOverride(true);
|
||||
var inlineSpellChecker = editor.getInlineSpellChecker(true);
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(elem, async function() {
|
||||
let spellchecker = inlineSpellChecker.spellChecker;
|
||||
|
@ -28,8 +28,8 @@ var editor_de;
|
||||
var selcon_de;
|
||||
var script;
|
||||
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
/** Test for Bug 1205983 **/
|
||||
|
@ -36,8 +36,8 @@ var script;
|
||||
* user behaviour.
|
||||
*/
|
||||
|
||||
let { maybeOnSpellCheck, onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck, onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -29,8 +29,8 @@ var spellchecker;
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(function() {
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
var elem = document.getElementById("en-US");
|
||||
|
@ -29,8 +29,8 @@ SimpleTest.waitForFocus(() => {
|
||||
|
||||
textarea.focus();
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(textarea, () => {
|
||||
// Callback parameter isn't set
|
||||
|
@ -30,8 +30,8 @@ SimpleTest.waitForFocus(() => {
|
||||
|
||||
textarea.focus();
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(textarea, () => {
|
||||
spellChecker.UpdateCurrentDictionary(() => {
|
||||
|
@ -21,8 +21,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1402822
|
||||
|
||||
const Ci = SpecialPowers.Ci;
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
function getMisspelledWords(editor) {
|
||||
|
@ -19,8 +19,8 @@
|
||||
<div id="edit1" contenteditable=true></div>
|
||||
|
||||
<script>
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -23,8 +23,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1497480
|
||||
|
||||
/** Test for Bug 1497480 **/
|
||||
let gMisspeltWords = [];
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
const template = document.createElement("template");
|
||||
|
@ -17,8 +17,8 @@
|
||||
<div id="contenteditable" contenteditable=true>kkkkökkkk</div>
|
||||
|
||||
<script>
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -24,8 +24,8 @@ const Ci = SpecialPowers.Ci;
|
||||
let {
|
||||
getDictionaryContentPref,
|
||||
onSpellCheck,
|
||||
} = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
} = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
/** Test for Bug 1402822 **/
|
||||
|
@ -22,8 +22,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1773802
|
||||
|
||||
const Ci = SpecialPowers.Ci;
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
function getMisspelledWords(editor) {
|
||||
|
@ -20,8 +20,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=338427
|
||||
|
||||
/** Test for Bug 338427 **/
|
||||
function init() {
|
||||
var { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
var textarea = document.getElementById("editor");
|
||||
var editor = SpecialPowers.wrap(textarea).editor;
|
||||
|
@ -45,8 +45,8 @@ function runTest() {
|
||||
editDoc().designMode = "on";
|
||||
editDoc().defaultView.focus();
|
||||
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(editDoc().documentElement, evalTest);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=432225
|
||||
|
||||
/** Test for Bug 432225 **/
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
@ -46,8 +46,8 @@ function runTest() {
|
||||
var edit = document.getElementById("edit");
|
||||
edit.focus();
|
||||
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(edit, function() {
|
||||
ok(isSpellingCheckOk(getEditor(), gMisspeltWords),
|
||||
|
@ -121,8 +121,8 @@ function runTest() {
|
||||
var edit = document.getElementById("edit");
|
||||
edit.focus();
|
||||
|
||||
onSpellCheck = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
onSpellCheck = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
).onSpellCheck;
|
||||
onSpellCheck(edit, runOnFocus);
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
function runTest() {
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
var x = document.getElementById("x");
|
||||
x.focus();
|
||||
|
@ -62,8 +62,8 @@ var loadListener = async function(evt) {
|
||||
editor.setSpellcheckUserOverride(true);
|
||||
var inlineSpellChecker = editor.getInlineSpellChecker(true);
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(elem, async function() {
|
||||
let spellchecker = inlineSpellChecker.spellChecker;
|
||||
|
@ -27,8 +27,8 @@ var elem_de;
|
||||
var editor_de;
|
||||
var script;
|
||||
|
||||
var { maybeOnSpellCheck, onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck, onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
/** Test for Bug 697981 **/
|
||||
|
@ -63,8 +63,8 @@ var loadListener = async function(evt) {
|
||||
editor.setSpellcheckUserOverride(true);
|
||||
var inlineSpellChecker = editor.getInlineSpellChecker(true);
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(elem, async function() {
|
||||
let spellchecker = inlineSpellChecker.spellChecker;
|
||||
|
@ -106,8 +106,8 @@ function continueTest(evt) {
|
||||
var inlineSpellChecker = editor.getInlineSpellChecker(true);
|
||||
const is_en_US = SpecialPowers.Services.locale.appLocaleAsBCP47 == "en-US";
|
||||
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { onSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
onSpellCheck(elem, async function() {
|
||||
var spellchecker = inlineSpellChecker.spellChecker;
|
||||
|
@ -12,8 +12,8 @@
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
SimpleTest.waitForFocus(async () => {
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
const { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
const editor = document.querySelector("div[contenteditable]");
|
||||
async function replaceWord(aMisspelledWord, aCorrectWord, aReplaceAll) {
|
||||
|
@ -8,8 +8,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
function waitForTick() {
|
||||
|
@ -13,8 +13,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1729653
|
||||
<body>
|
||||
<textarea rows="20" cols="50">That undfgdfg seems OK.</textarea>
|
||||
<script>
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
function waitForTick() {
|
||||
|
@ -10,8 +10,8 @@
|
||||
add_task(async function() {
|
||||
await new Promise(resolve => SimpleTest.waitForFocus(resolve));
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
let editingHost = document.querySelector("div[contenteditable][lang=en-US]");
|
||||
|
@ -15,8 +15,8 @@
|
||||
add_task(async function() {
|
||||
await new Promise(resolve => SimpleTest.waitForFocus(resolve));
|
||||
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
let { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
let element = document.getElementById("en-US");
|
||||
|
@ -65,8 +65,8 @@ function RunTest() {
|
||||
ok(map.exists());
|
||||
hunspell.addDirectory(map);
|
||||
|
||||
const {maybeOnSpellCheck} = ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm");
|
||||
const {maybeOnSpellCheck} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs");
|
||||
maybeOnSpellCheck(textbox, function () {
|
||||
|
||||
// test that base and map dictionaries are available
|
||||
|
@ -14,8 +14,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1170484
|
||||
/** Test for Bug 1170484 */
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
|
||||
SimpleTest.waitForFocus(doTest, window);
|
||||
|
@ -63,8 +63,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1272623
|
||||
}
|
||||
|
||||
add_task(async function() {
|
||||
maybeOnSpellCheck = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
maybeOnSpellCheck = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
).maybeOnSpellCheck;
|
||||
|
||||
// Wait for the page to be ready
|
||||
|
@ -12,8 +12,8 @@ x
|
||||
var p = document.getElementById('p');
|
||||
var div = p.parentNode;
|
||||
div.focus();
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(div, function () {
|
||||
var sel = window.getSelection();
|
||||
|
@ -19,8 +19,8 @@ x
|
||||
sel.addRange(range);
|
||||
p.parentNode.focus();
|
||||
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(p.parentNode, function () {
|
||||
sendKey('DOWN'); // now after "1"
|
||||
|
@ -12,8 +12,8 @@ x
|
||||
var p = document.getElementById('p');
|
||||
var div = p.parentNode;
|
||||
div.focus();
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(div, function () {
|
||||
var sel = window.getSelection();
|
||||
|
@ -19,8 +19,8 @@ x
|
||||
sel.addRange(range);
|
||||
p.parentNode.focus();
|
||||
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(p.parentNode, function () {
|
||||
sendKey('DOWN'); // now after "1"
|
||||
|
@ -3,8 +3,8 @@
|
||||
<script src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script>
|
||||
document.body.firstChild.focus();
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(document.body.firstChild, function() {
|
||||
document.documentElement.removeAttribute("class");
|
||||
|
@ -4,8 +4,8 @@
|
||||
<script>
|
||||
var div = document.body.firstChild;
|
||||
div.focus();
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"
|
||||
var { maybeOnSpellCheck } = SpecialPowers.ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"
|
||||
);
|
||||
maybeOnSpellCheck(div, function() {
|
||||
div.innerHTML = 'something missspelled<br>something elsed#';
|
||||
|
@ -44,8 +44,8 @@ function startTests()
|
||||
inputBox._input.focus();
|
||||
testNum = 0;
|
||||
|
||||
({onSpellCheck} = ChromeUtils.import(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.jsm"));
|
||||
({onSpellCheck} = ChromeUtils.importESModule(
|
||||
"resource://testing-common/AsyncSpellCheckTestHelper.sys.mjs"));
|
||||
onSpellCheck(inputBox._input, function () {
|
||||
bringUpContextMenu(inputBox);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user