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

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

Issue 2666093002: Remove base::FundamentalValue (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 (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_store_chromeos.h" 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 EXPECT_FALSE(store_->is_managed()); 80 EXPECT_FALSE(store_->is_managed());
81 EXPECT_EQ(std::string(), store_->policy_signature_public_key()); 81 EXPECT_EQ(std::string(), store_->policy_signature_public_key());
82 } 82 }
83 83
84 void ExpectSuccess() { 84 void ExpectSuccess() {
85 EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status()); 85 EXPECT_EQ(CloudPolicyStore::STATUS_OK, store_->status());
86 EXPECT_TRUE(store_->is_initialized()); 86 EXPECT_TRUE(store_->is_initialized());
87 EXPECT_TRUE(store_->has_policy()); 87 EXPECT_TRUE(store_->has_policy());
88 EXPECT_TRUE(store_->is_managed()); 88 EXPECT_TRUE(store_->is_managed());
89 EXPECT_TRUE(store_->policy()); 89 EXPECT_TRUE(store_->policy());
90 base::FundamentalValue expected(false); 90 base::Value expected(false);
91 EXPECT_TRUE( 91 EXPECT_TRUE(
92 base::Value::Equals(&expected, 92 base::Value::Equals(&expected,
93 store_->policy_map().GetValue( 93 store_->policy_map().GetValue(
94 key::kDeviceMetricsReportingEnabled))); 94 key::kDeviceMetricsReportingEnabled)));
95 EXPECT_FALSE(store_->policy_signature_public_key().empty()); 95 EXPECT_FALSE(store_->policy_signature_public_key().empty());
96 } 96 }
97 97
98 void PrepareExistingPolicy() { 98 void PrepareExistingPolicy() {
99 store_->Load(); 99 store_->Load();
100 FlushDeviceSettings(); 100 FlushDeviceSettings();
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 TEST_F(DeviceCloudPolicyStoreChromeOSTest, InstallInitialPolicyNotEnterprise) { 301 TEST_F(DeviceCloudPolicyStoreChromeOSTest, InstallInitialPolicyNotEnterprise) {
302 PrepareNewSigningKey(); 302 PrepareNewSigningKey();
303 ResetToNonEnterprise(); 303 ResetToNonEnterprise();
304 store_->InstallInitialPolicy(device_policy_.policy()); 304 store_->InstallInitialPolicy(device_policy_.policy());
305 FlushDeviceSettings(); 305 FlushDeviceSettings();
306 ExpectFailure(CloudPolicyStore::STATUS_BAD_STATE); 306 ExpectFailure(CloudPolicyStore::STATUS_BAD_STATE);
307 EXPECT_EQ(std::string(), store_->policy_signature_public_key()); 307 EXPECT_EQ(std::string(), store_->policy_signature_public_key());
308 } 308 }
309 309
310 } // namespace policy 310 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698