Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: chrome/browser/spellchecker/spellcheck_service_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 8
9 #include "base/command_line.h" 9 #include "base/command_line.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/prefs/pref_registry_simple.h"
13 #include "base/prefs/testing_pref_service.h"
14 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
15 #include "base/supports_user_data.h" 13 #include "base/supports_user_data.h"
16 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/pref_names.h" 15 #include "chrome/common/pref_names.h"
16 #include "components/prefs/pref_registry_simple.h"
17 #include "components/prefs/testing_pref_service.h"
18 #include "components/user_prefs/user_prefs.h" 18 #include "components/user_prefs/user_prefs.h"
19 #include "content/public/test/test_browser_thread.h" 19 #include "content/public/test/test_browser_thread.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 21
22 struct SpellcheckLanguageTestCase { 22 struct SpellcheckLanguageTestCase {
23 SpellcheckLanguageTestCase(const std::string& accept_languages, 23 SpellcheckLanguageTestCase(const std::string& accept_languages,
24 const std::string& unsplit_spellcheck_dictionaries, 24 const std::string& unsplit_spellcheck_dictionaries,
25 size_t num_expected_enabled_spellcheck_languages, 25 size_t num_expected_enabled_spellcheck_languages,
26 const std::string& unsplit_expected_languages) 26 const std::string& unsplit_expected_languages)
27 : accept_languages(accept_languages), 27 : accept_languages(accept_languages),
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 dictionaries.AppendStrings(GetParam().spellcheck_dictionaries); 98 dictionaries.AppendStrings(GetParam().spellcheck_dictionaries);
99 prefs()->Set(prefs::kSpellCheckDictionaries, dictionaries); 99 prefs()->Set(prefs::kSpellCheckDictionaries, dictionaries);
100 100
101 std::vector<std::string> spellcheck_languages; 101 std::vector<std::string> spellcheck_languages;
102 EXPECT_EQ(GetParam().num_expected_enabled_spellcheck_languages, 102 EXPECT_EQ(GetParam().num_expected_enabled_spellcheck_languages,
103 SpellcheckService::GetSpellCheckLanguages(context(), 103 SpellcheckService::GetSpellCheckLanguages(context(),
104 &spellcheck_languages)); 104 &spellcheck_languages));
105 105
106 EXPECT_EQ(GetParam().expected_spellcheck_languages, spellcheck_languages); 106 EXPECT_EQ(GetParam().expected_spellcheck_languages, spellcheck_languages);
107 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_service_browsertest.cc ('k') | chrome/browser/spellchecker/spelling_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698