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

Side by Side Diff: chrome/browser/chromeos/settings/device_oauth2_token_service_unittest.cc

Issue 228553002: Preference dis/allowing supervised users creation is now available as owner setting, not only as de… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unnecessary callback removed. Patch applied for failing tests. Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/settings/device_oauth2_token_service.h" 5 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/testing_pref_service.h" 8 #include "base/prefs/testing_pref_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/chromeos/policy/device_policy_builder.h" 10 #include "chrome/browser/chromeos/policy/device_policy_builder.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 owner_key_util_->SetPublicKeyFromPrivateKey( 91 owner_key_util_->SetPublicKeyFromPrivateKey(
92 *device_policy_.GetSigningKey()); 92 *device_policy_.GetSigningKey());
93 DeviceSettingsService::Get()->SetSessionManager( 93 DeviceSettingsService::Get()->SetSessionManager(
94 &device_settings_test_helper_, owner_key_util_); 94 &device_settings_test_helper_, owner_key_util_);
95 95
96 CrosSettings::Initialize(); 96 CrosSettings::Initialize();
97 } 97 }
98 98
99 virtual void TearDown() OVERRIDE { 99 virtual void TearDown() OVERRIDE {
100 CrosSettings::Shutdown(); 100 CrosSettings::Shutdown();
101 TestingBrowserProcess::GetGlobal()->SetBrowserPolicyConnector(NULL);
101 DeviceSettingsService::Get()->UnsetSessionManager(); 102 DeviceSettingsService::Get()->UnsetSessionManager();
102 DeviceSettingsService::Shutdown(); 103 DeviceSettingsService::Shutdown();
103 SystemSaltGetter::Shutdown(); 104 SystemSaltGetter::Shutdown();
104 DBusThreadManager::Shutdown(); 105 DBusThreadManager::Shutdown();
105 base::RunLoop().RunUntilIdle(); 106 base::RunLoop().RunUntilIdle();
106 } 107 }
107 108
108 void CreateService() { 109 void CreateService() {
109 oauth2_service_.reset(new DeviceOAuth2TokenService( 110 oauth2_service_.reset(new DeviceOAuth2TokenService(
110 request_context_getter_.get(), scoped_testing_local_state_.Get())); 111 request_context_getter_.get(), scoped_testing_local_state_.Get()));
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 424
424 AssertConsumerTokensAndErrors(0, 1); 425 AssertConsumerTokensAndErrors(0, 1);
425 426
426 // Retry should succeed. 427 // Retry should succeed.
427 request = StartTokenRequest(); 428 request = StartTokenRequest();
428 PerformURLFetches(); 429 PerformURLFetches();
429 AssertConsumerTokensAndErrors(1, 1); 430 AssertConsumerTokensAndErrors(1, 1);
430 } 431 }
431 432
432 } // namespace chromeos 433 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/users/user_manager_impl.cc ('k') | chrome/browser/chromeos/settings/device_settings_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698