Bug 1269209 - Port test_async_UpdateCurrentDictionary.html from chrome to plain; r=masayuki

MozReview-Commit-ID: 3dneNqKrYCe
This commit is contained in:
Aryeh Gregor 2016-08-22 21:00:48 +03:00
Родитель 2e0b779c1c
Коммит 6dc53c6bec
3 изменённых файлов: 7 добавлений и 6 удалений

Просмотреть файл

@ -1,7 +1,6 @@
[DEFAULT] [DEFAULT]
skip-if = buildapp == 'b2g' || os == 'android' skip-if = buildapp == 'b2g' || os == 'android'
[test_async_UpdateCurrentDictionary.html]
[test_bug338427.html] [test_bug338427.html]
[test_bug434998.xul] [test_bug434998.xul]
[test_bug678842.html] [test_bug678842.html]

Просмотреть файл

@ -13,6 +13,8 @@ support-files =
de-DE/de_DE.dic de-DE/de_DE.dic
de-DE/de_DE.aff de-DE/de_DE.aff
[test_async_UpdateCurrentDictionary.html]
skip-if = os == 'android'
[test_bug348497.html] [test_bug348497.html]
[test_bug384147.html] [test_bug384147.html]
[test_bug389350.html] [test_bug389350.html]

Просмотреть файл

@ -5,8 +5,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=856270
--> -->
<head> <head>
<title>Test for Bug 856270 - Async UpdateCurrentDictionary</title> <title>Test for Bug 856270 - Async UpdateCurrentDictionary</title>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> <script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" /> <link rel="stylesheet" href="/tests/SimpleTest/test.css">
</head> </head>
<body> <body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=856270">Mozilla Bug 856270</a> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=856270">Mozilla Bug 856270</a>
@ -21,12 +21,12 @@ SimpleTest.waitForExplicitFinish();
addLoadEvent(start); addLoadEvent(start);
function start() { function start() {
Components.utils.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm");
var textarea = document.getElementById("editor"); var textarea = document.getElementById("editor");
textarea.focus(); textarea.focus();
onSpellCheck(textarea, function () { SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm")
var isc = textarea.editor.getInlineSpellChecker(false); .onSpellCheck(textarea, function () {
var isc = SpecialPowers.wrap(textarea).editor.getInlineSpellChecker(false);
ok(isc, "Inline spell checker should exist after focus and spell check"); ok(isc, "Inline spell checker should exist after focus and spell check");
var sc = isc.spellChecker; var sc = isc.spellChecker;
isnot(sc.GetCurrentDictionary(), lang, isnot(sc.GetCurrentDictionary(), lang,