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

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

Issue 2737733003: Add Active Directory login UI tests (Closed)
Patch Set: Rebase Created 3 years, 9 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
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_impl.h" 5 #include "chrome/browser/chromeos/policy/affiliated_invalidation_service_provide r_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 invalidation_service_set_count_ = 0; 181 invalidation_service_set_count_ = 0;
182 return invalidation_service_set_count; 182 return invalidation_service_set_count;
183 } 183 }
184 184
185 const invalidation::InvalidationService* 185 const invalidation::InvalidationService*
186 FakeConsumer::GetInvalidationService() const { 186 FakeConsumer::GetInvalidationService() const {
187 return invalidation_service_; 187 return invalidation_service_;
188 } 188 }
189 189
190 AffiliatedInvalidationServiceProviderImplTest:: 190 AffiliatedInvalidationServiceProviderImplTest::
191 AffiliatedInvalidationServiceProviderImplTest() 191 AffiliatedInvalidationServiceProviderImplTest()
192 : device_invalidation_service_(nullptr), 192 : device_invalidation_service_(nullptr),
193 profile_invalidation_service_(nullptr), 193 profile_invalidation_service_(nullptr),
194 fake_user_manager_(new chromeos::FakeChromeUserManager), 194 fake_user_manager_(new chromeos::FakeChromeUserManager),
195 user_manager_enabler_(fake_user_manager_), 195 user_manager_enabler_(fake_user_manager_),
196 install_attributes_( 196 install_attributes_(
197 chromeos::ScopedStubInstallAttributes::CreateEnterprise( 197 chromeos::ScopedStubInstallAttributes::CreateCloudManaged(
198 "example.com", "device_id")), 198 "example.com",
199 profile_manager_(TestingBrowserProcess::GetGlobal()) { 199 "device_id")),
200 } 200 profile_manager_(TestingBrowserProcess::GetGlobal()) {}
201 201
202 void AffiliatedInvalidationServiceProviderImplTest::SetUp() { 202 void AffiliatedInvalidationServiceProviderImplTest::SetUp() {
203 chromeos::SystemSaltGetter::Initialize(); 203 chromeos::SystemSaltGetter::Initialize();
204 chromeos::DBusThreadManager::Initialize(); 204 chromeos::DBusThreadManager::Initialize();
205 ASSERT_TRUE(profile_manager_.SetUp()); 205 ASSERT_TRUE(profile_manager_.SetUp());
206 206
207 test_device_settings_service_.reset(new 207 test_device_settings_service_.reset(new
208 chromeos::ScopedTestDeviceSettingsService); 208 chromeos::ScopedTestDeviceSettingsService);
209 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings); 209 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings);
210 chromeos::DeviceOAuth2TokenServiceFactory::Initialize(); 210 chromeos::DeviceOAuth2TokenServiceFactory::Initialize();
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 EXPECT_EQ(0, consumer_->GetAndClearInvalidationServiceSetCount()); 673 EXPECT_EQ(0, consumer_->GetAndClearInvalidationServiceSetCount());
674 provider_->Shutdown(); 674 provider_->Shutdown();
675 EXPECT_EQ(1, consumer_->GetAndClearInvalidationServiceSetCount()); 675 EXPECT_EQ(1, consumer_->GetAndClearInvalidationServiceSetCount());
676 EXPECT_EQ(nullptr, consumer_->GetInvalidationService()); 676 EXPECT_EQ(nullptr, consumer_->GetInvalidationService());
677 677
678 // Verify that the device-global invalidation service has been destroyed. 678 // Verify that the device-global invalidation service has been destroyed.
679 EXPECT_FALSE(provider_->GetDeviceInvalidationServiceForTest()); 679 EXPECT_FALSE(provider_->GetDeviceInvalidationServiceForTest());
680 } 680 }
681 681
682 } // namespace policy 682 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698