Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: third_party/WebKit/LayoutTests/editing/spelling/resources/util.js

Issue 2270293003: Add a switch to TestRunner to enable/disable mock spell checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use in-class initialization Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
diff --git a/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js b/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
index 8d6e5d94b9242f91d8562751794bb2f91f7eb79f..e052a1b49e7f7b0cd7374da13e56b8bca2856d43 100644
--- a/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
+++ b/third_party/WebKit/LayoutTests/editing/spelling/resources/util.js
@@ -23,6 +23,7 @@ function initSpellTest(testElementId, testText, testFunction, opt_doNotFinishTes
log("FAIL Incomplete test environment");
return;
}
+ testRunner.setMockSpellCheckerEnabled(true);
testFunctionCallback = testFunction;
jsTestIsAsync = true;
internals.settings.setSmartInsertDeleteEnabled(true);
@@ -85,11 +86,12 @@ function runNextStep(test, steps, assertions) {
function runSpellingTest(steps, assertions, opt_title)
{
var t = async_test(opt_title);
- if (!window.internals) {
- t.step(() => assert_unreached('internals is required for this test'));
+ if (!window.internals || !window.testRunner) {
+ t.step(() => assert_unreached('Incomplete test environment'));
t.done();
return;
}
+ testRunner.setMockSpellCheckerEnabled(true);
runNextStep(t, steps, assertions);
}

Powered by Google App Engine
This is Rietveld 408576698