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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 | Annotate | Revision Log
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 <vector> 5 #include <vector>
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h" 9 #include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
10 #include "chrome/browser/spellchecker/spellcheck_factory.h" 10 #include "chrome/browser/spellchecker/spellcheck_factory.h"
11 #include "chrome/browser/spellchecker/spellcheck_service.h" 11 #include "chrome/browser/spellchecker/spellcheck_service.h"
12 #include "chrome/common/spellcheck_common.h" 12 #include "chrome/common/spellcheck_common.h"
13 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "content/public/test/test_browser_thread.h" 14 #include "content/public/test/test_browser_thread.h"
15 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 17
18 using content::BrowserThread; 18 using content::BrowserThread;
19 using chrome::spellcheck_common::WordList; 19 using chrome::spellcheck_common::WordList;
20 20
21 static ProfileKeyedService* BuildSpellcheckService( 21 static BrowserContextKeyedService* BuildSpellcheckService(
22 content::BrowserContext* profile) { 22 content::BrowserContext* profile) {
23 return new SpellcheckService(static_cast<Profile*>(profile)); 23 return new SpellcheckService(static_cast<Profile*>(profile));
24 } 24 }
25 25
26 class SpellcheckServiceTest : public testing::Test { 26 class SpellcheckServiceTest : public testing::Test {
27 protected: 27 protected:
28 SpellcheckServiceTest() 28 SpellcheckServiceTest()
29 : ui_thread_(BrowserThread::UI, &message_loop_), 29 : ui_thread_(BrowserThread::UI, &message_loop_),
30 file_thread_(BrowserThread::FILE, &message_loop_), 30 file_thread_(BrowserThread::FILE, &message_loop_),
31 profile_(new TestingProfile()) { 31 profile_(new TestingProfile()) {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 accept_languages.push_back("fr"); 115 accept_languages.push_back("fr");
116 accept_languages.push_back("aa"); // Will not exist. 116 accept_languages.push_back("aa"); // Will not exist.
117 std::vector<std::string> languages; 117 std::vector<std::string> languages;
118 118
119 SpellcheckService::GetSpellCheckLanguagesFromAcceptLanguages( 119 SpellcheckService::GetSpellCheckLanguagesFromAcceptLanguages(
120 accept_languages, "fr", &languages); 120 accept_languages, "fr", &languages);
121 121
122 EXPECT_EQ(1U, languages.size()); 122 EXPECT_EQ(1U, languages.size());
123 EXPECT_EQ("fr", languages[0]); 123 EXPECT_EQ("fr", languages[0]);
124 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698