OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "chrome/common/spellcheck_marker.h" | 9 #include "chrome/common/spellcheck_marker.h" |
10 #include "chrome/common/spellcheck_messages.h" | 10 #include "chrome/common/spellcheck_messages.h" |
11 #include "chrome/renderer/spellchecker/spellcheck_provider_test.h" | 11 #include "chrome/renderer/spellchecker/spellcheck_provider_test.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" | 13 #include "third_party/WebKit/public/platform/WebString.h" |
14 | 14 |
15 // Tests for Hunspell functionality in SpellcheckingProvider | 15 // Tests for Hunspell functionality in SpellcheckingProvider |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 TEST_F(SpellCheckProviderTest, UsingHunspell) { | 19 TEST_F(SpellCheckProviderTest, UsingHunspell) { |
20 FakeTextCheckingCompletion completion; | 20 FakeTextCheckingCompletion completion; |
21 provider_.RequestTextChecking(WebKit::WebString("hello"), | 21 provider_.RequestTextChecking(WebKit::WebString("hello"), |
22 &completion, | 22 &completion, |
23 std::vector<SpellCheckMarker>()); | 23 std::vector<SpellCheckMarker>()); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 provider_.RequestTextChecking(WebKit::WebString("hello world."), | 173 provider_.RequestTextChecking(WebKit::WebString("hello world."), |
174 &completion, | 174 &completion, |
175 std::vector<SpellCheckMarker>()); | 175 std::vector<SpellCheckMarker>()); |
176 EXPECT_EQ(completion.completion_count_, 3U); | 176 EXPECT_EQ(completion.completion_count_, 3U); |
177 EXPECT_EQ(completion.cancellation_count_, 1U); | 177 EXPECT_EQ(completion.cancellation_count_, 1U); |
178 EXPECT_EQ(provider_.spelling_service_call_count_, 2U); | 178 EXPECT_EQ(provider_.spelling_service_call_count_, 2U); |
179 } | 179 } |
180 | 180 |
181 } // namespace | 181 } // namespace |
OLD | NEW |