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

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

Issue 2728463004: Remove enterprise serial number recovery feature (Closed)
Patch Set: Removed access to removed fied in policy_testserver.py. Created 3 years, 7 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_local_account_policy_service.h" 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 const em::PolicyFetchRequest* extensions = 429 const em::PolicyFetchRequest* extensions =
430 &request.policy_request().request(1); 430 &request.policy_request().request(1);
431 // The order is not guarateed. 431 // The order is not guarateed.
432 if (extensions->policy_type() == 432 if (extensions->policy_type() ==
433 dm_protocol::kChromePublicAccountPolicyType) { 433 dm_protocol::kChromePublicAccountPolicyType) {
434 std::swap(public_account, extensions); 434 std::swap(public_account, extensions);
435 } 435 }
436 436
437 EXPECT_EQ(dm_protocol::kChromePublicAccountPolicyType, 437 EXPECT_EQ(dm_protocol::kChromePublicAccountPolicyType,
438 public_account->policy_type()); 438 public_account->policy_type());
439 EXPECT_FALSE(public_account->has_machine_id());
440 EXPECT_EQ(kAccount1, public_account->settings_entity_id()); 439 EXPECT_EQ(kAccount1, public_account->settings_entity_id());
441 440
442 EXPECT_EQ(dm_protocol::kChromeExtensionPolicyType, 441 EXPECT_EQ(dm_protocol::kChromeExtensionPolicyType,
443 extensions->policy_type()); 442 extensions->policy_type());
444 EXPECT_FALSE(extensions->has_machine_id());
445 EXPECT_FALSE(extensions->has_settings_entity_id()); 443 EXPECT_FALSE(extensions->has_settings_entity_id());
446 444
447 ASSERT_TRUE(broker->core()->store()); 445 ASSERT_TRUE(broker->core()->store());
448 EXPECT_EQ(CloudPolicyStore::STATUS_OK, 446 EXPECT_EQ(CloudPolicyStore::STATUS_OK,
449 broker->core()->store()->status()); 447 broker->core()->store()->status());
450 ASSERT_TRUE(broker->core()->store()->policy()); 448 ASSERT_TRUE(broker->core()->store()->policy());
451 EXPECT_EQ(device_local_account_policy_.policy_data().SerializeAsString(), 449 EXPECT_EQ(device_local_account_policy_.policy_data().SerializeAsString(),
452 broker->core()->store()->policy()->SerializeAsString()); 450 broker->core()->store()->policy()->SerializeAsString());
453 EXPECT_TRUE(expected_policy_map_.Equals( 451 EXPECT_TRUE(expected_policy_map_.Equals(
454 broker->core()->store()->policy_map())); 452 broker->core()->store()->policy_map()));
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1028
1031 provider_ = DeviceLocalAccountPolicyProvider::Create( 1029 provider_ = DeviceLocalAccountPolicyProvider::Create(
1032 GenerateDeviceLocalAccountUserId(kAccount1, 1030 GenerateDeviceLocalAccountUserId(kAccount1,
1033 DeviceLocalAccount::TYPE_PUBLIC_SESSION), 1031 DeviceLocalAccount::TYPE_PUBLIC_SESSION),
1034 service_.get(), true /*force_immediate_load*/); 1032 service_.get(), true /*force_immediate_load*/);
1035 1033
1036 EXPECT_TRUE(provider_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 1034 EXPECT_TRUE(provider_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
1037 } 1035 }
1038 1036
1039 } // namespace policy 1037 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698