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> |
| 8 |
7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" |
8 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
9 #include "base/prefs/pref_registry_simple.h" | 12 #include "base/prefs/pref_registry_simple.h" |
10 #include "base/prefs/testing_pref_service.h" | 13 #include "base/prefs/testing_pref_service.h" |
11 #include "base/strings/string_split.h" | 14 #include "base/strings/string_split.h" |
12 #include "base/supports_user_data.h" | 15 #include "base/supports_user_data.h" |
13 #include "chrome/common/chrome_switches.h" | 16 #include "chrome/common/chrome_switches.h" |
14 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
15 #include "components/user_prefs/user_prefs.h" | 18 #include "components/user_prefs/user_prefs.h" |
16 #include "content/public/test/test_browser_thread.h" | 19 #include "content/public/test/test_browser_thread.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 dictionaries.AppendStrings(GetParam().spellcheck_dictionaries); | 98 dictionaries.AppendStrings(GetParam().spellcheck_dictionaries); |
96 prefs()->Set(prefs::kSpellCheckDictionaries, dictionaries); | 99 prefs()->Set(prefs::kSpellCheckDictionaries, dictionaries); |
97 | 100 |
98 std::vector<std::string> spellcheck_languages; | 101 std::vector<std::string> spellcheck_languages; |
99 EXPECT_EQ(GetParam().num_expected_enabled_spellcheck_languages, | 102 EXPECT_EQ(GetParam().num_expected_enabled_spellcheck_languages, |
100 SpellcheckService::GetSpellCheckLanguages(context(), | 103 SpellcheckService::GetSpellCheckLanguages(context(), |
101 &spellcheck_languages)); | 104 &spellcheck_languages)); |
102 | 105 |
103 EXPECT_EQ(GetParam().expected_spellcheck_languages, spellcheck_languages); | 106 EXPECT_EQ(GetParam().expected_spellcheck_languages, spellcheck_languages); |
104 } | 107 } |
OLD | NEW |