| Index: components/test_runner/test_runner.cc
|
| diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
|
| index e24c5b030855d78fd5bbd7356859d2c72d2c119a..d2a1d5a196ce3121ae0e519e40fea0e875e61c84 100644
|
| --- a/components/test_runner/test_runner.cc
|
| +++ b/components/test_runner/test_runner.cc
|
| @@ -241,6 +241,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
|
| void SetPrinting();
|
| void SetScriptsAllowed(bool allowed);
|
| void SetShouldStayOnPageAfterHandlingBeforeUnload(bool value);
|
| + void SetSpellCheckResolvedCallback(v8::Local<v8::Function> callback);
|
| void SetStorageAllowed(bool allowed);
|
| void SetTabKeyCyclesThroughElements(bool tab_key_cycles_through_elements);
|
| void SetTextDirection(const std::string& direction_name);
|
| @@ -560,6 +561,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| .SetMethod(
|
| "setShouldStayOnPageAfterHandlingBeforeUnload",
|
| &TestRunnerBindings::SetShouldStayOnPageAfterHandlingBeforeUnload)
|
| + .SetMethod("setSpellCheckResolvedCallback",
|
| + &TestRunnerBindings::SetSpellCheckResolvedCallback)
|
| .SetMethod("setStorageAllowed", &TestRunnerBindings::SetStorageAllowed)
|
| .SetMethod("setTabKeyCyclesThroughElements",
|
| &TestRunnerBindings::SetTabKeyCyclesThroughElements)
|
| @@ -748,6 +751,12 @@ void TestRunnerBindings::SetMockSpellCheckerEnabled(bool enabled) {
|
| runner_->SetMockSpellCheckerEnabled(enabled);
|
| }
|
|
|
| +void TestRunnerBindings::SetSpellCheckResolvedCallback(
|
| + v8::Local<v8::Function> callback) {
|
| + if (runner_)
|
| + runner_->spellcheck_->SetSpellCheckResolvedCallback(callback);
|
| +}
|
| +
|
| v8::Local<v8::Value>
|
| TestRunnerBindings::EvaluateScriptInIsolatedWorldAndReturnValue(
|
| int world_id, const std::string& script) {
|
| @@ -1680,7 +1689,7 @@ void TestRunner::Reset() {
|
| else
|
| close_remaining_windows_ = true;
|
|
|
| - spellcheck_->SetEnabled(false);
|
| + spellcheck_->Reset();
|
| }
|
|
|
| void TestRunner::SetTestIsRunning(bool running) {
|
|
|