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

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

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a bug affecting ProfileSyncService and CR comments. Created 7 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/device_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 owner_key_util_->SetPublicKeyFromPrivateKey( 358 owner_key_util_->SetPublicKeyFromPrivateKey(
359 *device_policy_.GetNewSigningKey()); 359 *device_policy_.GetNewSigningKey());
360 ReloadDeviceSettings(); 360 ReloadDeviceSettings();
361 361
362 if (done_) 362 if (done_)
363 return; 363 return;
364 364
365 // Process robot refresh token store. 365 // Process robot refresh token store.
366 EXPECT_EQ( 366 EXPECT_EQ(
367 "refreshToken4Test", 367 "refreshToken4Test",
368 chromeos::DeviceOAuth2TokenServiceFactory::Get()->GetRefreshToken()); 368 chromeos::DeviceOAuth2TokenServiceFactory::Get()->GetRefreshToken(
Andrew T Wilson (Slow) 2013/08/30 10:47:00 The fact that there's this unnecessary account_id
fgorski 2013/08/30 20:10:16 Done. Using GetDeviceAccountId().
369 std::string()));
369 } 370 }
370 371
371 bool is_auto_enrollment_; 372 bool is_auto_enrollment_;
372 373
373 DeviceManagementStatus register_status_; 374 DeviceManagementStatus register_status_;
374 em::DeviceManagementResponse register_response_; 375 em::DeviceManagementResponse register_response_;
375 376
376 DeviceManagementStatus policy_fetch_status_; 377 DeviceManagementStatus policy_fetch_status_;
377 em::DeviceManagementResponse policy_fetch_response_; 378 em::DeviceManagementResponse policy_fetch_response_;
378 379
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentTest, LoadError) { 488 TEST_F(DeviceCloudPolicyManagerChromeOSEnrollmentTest, LoadError) {
488 loaded_blob_.clear(); 489 loaded_blob_.clear();
489 RunTest(); 490 RunTest();
490 ExpectFailedEnrollment(EnrollmentStatus::STATUS_STORE_ERROR); 491 ExpectFailedEnrollment(EnrollmentStatus::STATUS_STORE_ERROR);
491 EXPECT_EQ(CloudPolicyStore::STATUS_LOAD_ERROR, 492 EXPECT_EQ(CloudPolicyStore::STATUS_LOAD_ERROR,
492 status_.store_status()); 493 status_.store_status());
493 } 494 }
494 495
495 } // namespace 496 } // namespace
496 } // namespace policy 497 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698