| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/spellchecker/spellcheck_platform.h" | 5 #include "components/spellcheck/browser/spellcheck_platform.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
| 15 #include "chrome/common/spellcheck_result.h" | 15 #include "components/spellcheck/common/spellcheck_result.h" |
| 16 #include "content/public/test/test_utils.h" | 16 #include "content/public/test/test_utils.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 class SpellcheckPlatformMacTest: public testing::Test { | 21 class SpellcheckPlatformMacTest: public testing::Test { |
| 22 public: | 22 public: |
| 23 SpellcheckPlatformMacTest() | 23 SpellcheckPlatformMacTest() |
| 24 : callback_(base::Bind(&SpellcheckPlatformMacTest::CompletionCallback, | 24 : callback_(base::Bind(&SpellcheckPlatformMacTest::CompletionCallback, |
| 25 base::Unretained(this))), | 25 base::Unretained(this))), |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 // RequestTextCheck results. | 387 // RequestTextCheck results. |
| 388 TEST_F(SpellcheckPlatformMacTest, SpellCheckIgnoresOrthography) { | 388 TEST_F(SpellcheckPlatformMacTest, SpellCheckIgnoresOrthography) { |
| 389 base::string16 test_string(base::ASCIIToUTF16("Icland is awesome.")); | 389 base::string16 test_string(base::ASCIIToUTF16("Icland is awesome.")); |
| 390 spellcheck_platform::RequestTextCheck(0, test_string, callback_); | 390 spellcheck_platform::RequestTextCheck(0, test_string, callback_); |
| 391 WaitForCallback(); | 391 WaitForCallback(); |
| 392 EXPECT_TRUE(callback_finished_); | 392 EXPECT_TRUE(callback_finished_); |
| 393 EXPECT_EQ(1U, results_.size()); | 393 EXPECT_EQ(1U, results_.size()); |
| 394 } | 394 } |
| 395 | 395 |
| 396 } // namespace | 396 } // namespace |
| OLD | NEW |