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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_unittest_chromeos.cc

Issue 2549623006: Fix TestBrowserThread destruction order in CrOS tests. (Closed)
Patch Set: +comment on Leaky 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/metrics/leak_detector/leak_detector_controller_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/easy_unlock_service.h" 5 #include "chrome/browser/signin/easy_unlock_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 mock_user_manager_->AddUser(account_id); 290 mock_user_manager_->AddUser(account_id);
291 profile->get()->set_profile_name(account_id.GetUserEmail()); 291 profile->get()->set_profile_name(account_id.GetUserEmail());
292 292
293 SigninManagerBase* signin_manager = 293 SigninManagerBase* signin_manager =
294 SigninManagerFactory::GetForProfile(profile->get()); 294 SigninManagerFactory::GetForProfile(profile->get());
295 signin_manager->SetAuthenticatedAccountInfo(account_id.GetGaiaId(), 295 signin_manager->SetAuthenticatedAccountInfo(account_id.GetGaiaId(),
296 account_id.GetUserEmail()); 296 account_id.GetUserEmail());
297 } 297 }
298 298
299 private:
300 // Must outlive TestingProfiles.
301 content::TestBrowserThreadBundle thread_bundle_;
302
299 protected: 303 protected:
300 std::unique_ptr<TestingProfile> profile_; 304 std::unique_ptr<TestingProfile> profile_;
301 std::unique_ptr<TestingProfile> secondary_profile_; 305 std::unique_ptr<TestingProfile> secondary_profile_;
302 chromeos::MockUserManager* mock_user_manager_; 306 chromeos::MockUserManager* mock_user_manager_;
303 307
304 private: 308 private:
305 content::TestBrowserThreadBundle thread_bundle_;
306
307 chromeos::ScopedUserManagerEnabler scoped_user_manager_; 309 chromeos::ScopedUserManagerEnabler scoped_user_manager_;
308 310
309 FakePowerManagerClient* power_manager_client_; 311 FakePowerManagerClient* power_manager_client_;
310 312
311 bool is_bluetooth_adapter_present_; 313 bool is_bluetooth_adapter_present_;
312 scoped_refptr<testing::NiceMock<MockBluetoothAdapter>> mock_adapter_; 314 scoped_refptr<testing::NiceMock<MockBluetoothAdapter>> mock_adapter_;
313 315
314 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceTest); 316 DISALLOW_COPY_AND_ASSIGN(EasyUnlockServiceTest);
315 }; 317 };
316 318
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserPrimary, kPrimaryGaiaId), 386 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserPrimary, kPrimaryGaiaId),
385 EasyUnlockService::Get(profile_.get())->GetAccountId()); 387 EasyUnlockService::Get(profile_.get())->GetAccountId());
386 388
387 SetUpSecondaryProfile(); 389 SetUpSecondaryProfile();
388 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserSecondary, 390 EXPECT_EQ(AccountId::FromUserEmailGaiaId(kTestUserSecondary,
389 kSecondaryGaiaId), 391 kSecondaryGaiaId),
390 EasyUnlockService::Get(secondary_profile_.get())->GetAccountId()); 392 EasyUnlockService::Get(secondary_profile_.get())->GetAccountId());
391 } 393 }
392 394
393 } // namespace 395 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/metrics/leak_detector/leak_detector_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698