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 "chrome/browser/spellchecker/spellcheck_service.h" | 5 #include "chrome/browser/spellchecker/spellcheck_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 #include <tuple> | 10 #include <tuple> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/synchronization/waitable_event.h" | 19 #include "base/synchronization/waitable_event.h" |
20 #include "base/values.h" | 20 #include "base/values.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/spellchecker/spellcheck_factory.h" | 22 #include "chrome/browser/spellchecker/spellcheck_factory.h" |
23 #include "chrome/browser/ui/browser.h" | 23 #include "chrome/browser/ui/browser.h" |
24 #include "chrome/common/chrome_paths.h" | 24 #include "chrome/common/chrome_paths.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
27 #include "chrome/common/spellcheck_common.h" | 27 #include "components/spellcheck/common/spellcheck_common.h" |
28 #include "chrome/common/spellcheck_messages.h" | 28 #include "components/spellcheck/common/spellcheck_messages.h" |
29 #include "chrome/test/base/in_process_browser_test.h" | 29 #include "chrome/test/base/in_process_browser_test.h" |
30 #include "components/prefs/pref_service.h" | 30 #include "components/prefs/pref_service.h" |
31 #include "components/user_prefs/user_prefs.h" | 31 #include "components/user_prefs/user_prefs.h" |
32 #include "content/public/test/mock_render_process_host.h" | 32 #include "content/public/test/mock_render_process_host.h" |
33 #include "content/public/test/test_utils.h" | 33 #include "content/public/test/test_utils.h" |
34 #include "url/gurl.h" | 34 #include "url/gurl.h" |
35 | 35 |
36 using content::BrowserContext; | 36 using content::BrowserContext; |
37 | 37 |
38 namespace { | 38 namespace { |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 EXPECT_TRUE(GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); | 376 EXPECT_TRUE(GetPrefs()->GetBoolean(prefs::kEnableContinuousSpellcheck)); |
377 EXPECT_EQ(2U, GetPrefs()->GetList(prefs::kSpellCheckDictionaries)->GetSize()); | 377 EXPECT_EQ(2U, GetPrefs()->GetList(prefs::kSpellCheckDictionaries)->GetSize()); |
378 std::string pref; | 378 std::string pref; |
379 ASSERT_TRUE( | 379 ASSERT_TRUE( |
380 GetPrefs()->GetList(prefs::kSpellCheckDictionaries)->GetString(0, &pref)); | 380 GetPrefs()->GetList(prefs::kSpellCheckDictionaries)->GetString(0, &pref)); |
381 EXPECT_EQ("en-US", pref); | 381 EXPECT_EQ("en-US", pref); |
382 ASSERT_TRUE( | 382 ASSERT_TRUE( |
383 GetPrefs()->GetList(prefs::kSpellCheckDictionaries)->GetString(1, &pref)); | 383 GetPrefs()->GetList(prefs::kSpellCheckDictionaries)->GetString(1, &pref)); |
384 EXPECT_EQ("fr", pref); | 384 EXPECT_EQ("fr", pref); |
385 } | 385 } |
OLD | NEW |