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/signin/chrome_signin_client_unittest.cc

Issue 2523093002: TestBrowserThreads must outlive TestProfiles and TestProfileManagers (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « chrome/browser/sessions/tab_loader_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 class ChromeSigninClientTest : public testing::Test { 82 class ChromeSigninClientTest : public testing::Test {
83 public: 83 public:
84 ChromeSigninClientTest() {} 84 ChromeSigninClientTest() {}
85 void SetUp() override; 85 void SetUp() override;
86 86
87 Profile* profile() { return profile_.get(); } 87 Profile* profile() { return profile_.get(); }
88 SigninClient* signin_client() { return signin_client_; } 88 SigninClient* signin_client() { return signin_client_; }
89 89
90 private: 90 private:
91 content::TestBrowserThreadBundle thread_bundle_;
91 std::unique_ptr<Profile> profile_; 92 std::unique_ptr<Profile> profile_;
92 SigninClient* signin_client_; 93 SigninClient* signin_client_;
93 content::TestBrowserThreadBundle thread_bundle_;
94 }; 94 };
95 95
96 void ChromeSigninClientTest::SetUp() { 96 void ChromeSigninClientTest::SetUp() {
97 // Create a signed-in profile. 97 // Create a signed-in profile.
98 TestingProfile::Builder builder; 98 TestingProfile::Builder builder;
99 profile_ = builder.Build(); 99 profile_ = builder.Build();
100 100
101 signin_client_ = ChromeSigninClientFactory::GetForProfile(profile()); 101 signin_client_ = ChromeSigninClientFactory::GetForProfile(profile());
102 } 102 }
103 103
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath())) 254 EXPECT_CALL(*client_, ShowUserManager(browser()->profile()->GetPath()))
255 .Times(0); 255 .Times(0);
256 EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath())) 256 EXPECT_CALL(*client_, LockForceSigninProfile(browser()->profile()->GetPath()))
257 .Times(0); 257 .Times(0);
258 EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1); 258 EXPECT_CALL(*manager_, DoSignOut(source_metric, delete_metric)).Times(1);
259 manager_->SignOut(source_metric, delete_metric); 259 manager_->SignOut(source_metric, delete_metric);
260 } 260 }
261 261
262 #endif // !defined(OS_ANDROID) 262 #endif // !defined(OS_ANDROID)
263 #endif // !defined(OS_CHROMEOS) 263 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/sessions/tab_loader_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698