| Index: third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..83cfbc76fdf6c23d9b30bcabe78c7d324db5576a
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/editing/spellcheck/SpellCheckerTest.cpp
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/editing/spellcheck/SpellChecker.h"
|
| +
|
| +#include "core/editing/EditingTestBase.h"
|
| +#include "core/editing/Editor.h"
|
| +#include "core/frame/Settings.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class SpellCheckerTest : public EditingTestBase {
|
| +};
|
| +
|
| +TEST_F(SpellCheckerTest, AdvanceToNextMisspellingWithEmptyInputNoCrash)
|
| +{
|
| + setBodyContent("<input placeholder='placeholder'>abc");
|
| + updateLayoutAndStyleForPainting();
|
| + RefPtrWillBeRawPtr<Element> input = document().querySelector("input", ASSERT_NO_EXCEPTION);
|
| + input->focus();
|
| + document().settings()->setUnifiedTextCheckerEnabled(true);
|
| + // Do not crash in AdvanceToNextMisspelling command.
|
| + EXPECT_TRUE(document().frame()->editor().executeCommand("AdvanceToNextMisspelling"));
|
| + document().settings()->setUnifiedTextCheckerEnabled(false);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|