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

Side by Side Diff: chrome/browser/chromeos/policy/affiliated_invalidation_service_provider_unittest.cc

Issue 892633003: Do not announce robot account token before account ID is available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unbroke unit tests. Created 5 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc » ('j') | 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/chromeos/policy/affiliated_invalidation_service_provide r.h" 5 #include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provide r.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" 10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 install_attributes_("example.com", 136 install_attributes_("example.com",
137 "user@example.com", 137 "user@example.com",
138 "device_id", 138 "device_id",
139 DEVICE_MODE_ENTERPRISE), 139 DEVICE_MODE_ENTERPRISE),
140 profile_manager_(TestingBrowserProcess::GetGlobal()) { 140 profile_manager_(TestingBrowserProcess::GetGlobal()) {
141 } 141 }
142 142
143 void AffiliatedInvalidationServiceProviderTest::SetUp() { 143 void AffiliatedInvalidationServiceProviderTest::SetUp() {
144 chromeos::SystemSaltGetter::Initialize(); 144 chromeos::SystemSaltGetter::Initialize();
145 chromeos::DBusThreadManager::Initialize(); 145 chromeos::DBusThreadManager::Initialize();
146 chromeos::DeviceOAuth2TokenServiceFactory::Initialize();
147 ASSERT_TRUE(profile_manager_.SetUp()); 146 ASSERT_TRUE(profile_manager_.SetUp());
148 147
149 test_device_settings_service_.reset(new 148 test_device_settings_service_.reset(new
150 chromeos::ScopedTestDeviceSettingsService); 149 chromeos::ScopedTestDeviceSettingsService);
151 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings); 150 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings);
151 chromeos::DeviceOAuth2TokenServiceFactory::Initialize();
152 152
153 invalidation::ProfileInvalidationProviderFactory::GetInstance()-> 153 invalidation::ProfileInvalidationProviderFactory::GetInstance()->
154 RegisterTestingFactory(BuildProfileInvalidationProvider); 154 RegisterTestingFactory(BuildProfileInvalidationProvider);
155 155
156 provider_.reset(new AffiliatedInvalidationServiceProvider); 156 provider_.reset(new AffiliatedInvalidationServiceProvider);
157 } 157 }
158 158
159 void AffiliatedInvalidationServiceProviderTest::TearDown() { 159 void AffiliatedInvalidationServiceProviderTest::TearDown() {
160 provider_->Shutdown(); 160 provider_->Shutdown();
161 provider_.reset(); 161 provider_.reset();
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 618
619 // Verify that the device-global invalidation service still does not exist. 619 // Verify that the device-global invalidation service still does not exist.
620 EXPECT_FALSE(provider_->GetDeviceInvalidationServiceForTest()); 620 EXPECT_FALSE(provider_->GetDeviceInvalidationServiceForTest());
621 621
622 // Unregister the consumer. 622 // Unregister the consumer.
623 provider_->UnregisterConsumer(&consumer_); 623 provider_->UnregisterConsumer(&consumer_);
624 Mock::VerifyAndClearExpectations(&consumer_); 624 Mock::VerifyAndClearExpectations(&consumer_);
625 } 625 }
626 626
627 } // namespace policy 627 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_cloud_policy_invalidator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698