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

Side by Side Diff: chrome/browser/chromeos/contacts/contact_manager_unittest.cc

Issue 11759019: Update other unittests to use newly added TestingBrowserProcess::GetGlobal(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: simpler codez Created 7 years, 11 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 "chrome/browser/chromeos/contacts/contact_manager.h" 5 #include "chrome/browser/chromeos/contacts/contact_manager.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/test/base/testing_browser_process.h" 9 #include "chrome/test/base/testing_browser_process.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 class ContactManagerTest : public testing::Test { 64 class ContactManagerTest : public testing::Test {
65 public: 65 public:
66 ContactManagerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} 66 ContactManagerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {}
67 virtual ~ContactManagerTest() {} 67 virtual ~ContactManagerTest() {}
68 68
69 protected: 69 protected:
70 // testing::Test implementation. 70 // testing::Test implementation.
71 virtual void SetUp() OVERRIDE { 71 virtual void SetUp() OVERRIDE {
72 profile_manager_.reset( 72 profile_manager_.reset(
73 new TestingProfileManager( 73 new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
74 static_cast<TestingBrowserProcess*>(g_browser_process)));
75 ASSERT_TRUE(profile_manager_->SetUp()); 74 ASSERT_TRUE(profile_manager_->SetUp());
76 75
77 contact_manager_.reset(new ContactManager); 76 contact_manager_.reset(new ContactManager);
78 store_factory_ = new FakeContactStoreFactory; 77 store_factory_ = new FakeContactStoreFactory;
79 contact_manager_->SetContactStoreForTesting( 78 contact_manager_->SetContactStoreForTesting(
80 scoped_ptr<ContactStoreFactory>(store_factory_).Pass()); 79 scoped_ptr<ContactStoreFactory>(store_factory_).Pass());
81 contact_manager_->Init(); 80 contact_manager_->Init();
82 } 81 }
83 82
84 MessageLoopForUI message_loop_; 83 MessageLoopForUI message_loop_;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 store_factory_->set_permit_store_creation(false); 162 store_factory_->set_permit_store_creation(false);
164 const std::string kProfileName = "test_profile"; 163 const std::string kProfileName = "test_profile";
165 TestingProfile* profile = 164 TestingProfile* profile =
166 profile_manager_->CreateTestingProfile(kProfileName); 165 profile_manager_->CreateTestingProfile(kProfileName);
167 EXPECT_FALSE(store_factory_->GetContactStoreForProfile(profile)); 166 EXPECT_FALSE(store_factory_->GetContactStoreForProfile(profile));
168 profile_manager_->DeleteTestingProfile(kProfileName); 167 profile_manager_->DeleteTestingProfile(kProfileName);
169 } 168 }
170 169
171 } // namespace test 170 } // namespace test
172 } // namespace contacts 171 } // namespace contacts
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698