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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_validator_unittest.cc

Issue 448143008: Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 (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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 TEST_F(CloudPolicyValidatorTest, SuccessfulRunValidationWithNoDMTokens) { 155 TEST_F(CloudPolicyValidatorTest, SuccessfulRunValidationWithNoDMTokens) {
156 existing_dm_token_.clear(); 156 existing_dm_token_.clear();
157 policy_.policy_data().clear_request_token(); 157 policy_.policy_data().clear_request_token();
158 ignore_missing_dm_token_ = CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED; 158 ignore_missing_dm_token_ = CloudPolicyValidatorBase::DM_TOKEN_NOT_REQUIRED;
159 Validate(Invoke(this, &CloudPolicyValidatorTest::CheckSuccessfulValidation)); 159 Validate(Invoke(this, &CloudPolicyValidatorTest::CheckSuccessfulValidation));
160 } 160 }
161 161
162 TEST_F(CloudPolicyValidatorTest, UsernameCanonicalization) { 162 TEST_F(CloudPolicyValidatorTest, UsernameCanonicalization) {
163 policy_.policy_data().set_username( 163 policy_.policy_data().set_username(
164 StringToUpperASCII(std::string(PolicyBuilder::kFakeUsername))); 164 base::StringToUpperASCII(std::string(PolicyBuilder::kFakeUsername)));
165 Validate(CheckStatus(CloudPolicyValidatorBase::VALIDATION_OK)); 165 Validate(CheckStatus(CloudPolicyValidatorBase::VALIDATION_OK));
166 } 166 }
167 167
168 TEST_F(CloudPolicyValidatorTest, ErrorNoPolicyType) { 168 TEST_F(CloudPolicyValidatorTest, ErrorNoPolicyType) {
169 policy_.policy_data().clear_policy_type(); 169 policy_.policy_data().clear_policy_type();
170 Validate(CheckStatus(CloudPolicyValidatorBase::VALIDATION_WRONG_POLICY_TYPE)); 170 Validate(CheckStatus(CloudPolicyValidatorBase::VALIDATION_WRONG_POLICY_TYPE));
171 } 171 }
172 172
173 TEST_F(CloudPolicyValidatorTest, ErrorWrongPolicyType) { 173 TEST_F(CloudPolicyValidatorTest, ErrorWrongPolicyType) {
174 policy_.policy_data().set_policy_type("invalid"); 174 policy_.policy_data().set_policy_type("invalid");
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 378
379 TEST_F(CloudPolicyValidatorTest, NoRotation) { 379 TEST_F(CloudPolicyValidatorTest, NoRotation) {
380 allow_key_rotation_ = false; 380 allow_key_rotation_ = false;
381 policy_.UnsetNewSigningKey(); 381 policy_.UnsetNewSigningKey();
382 Validate(CheckStatus(CloudPolicyValidatorBase::VALIDATION_OK)); 382 Validate(CheckStatus(CloudPolicyValidatorBase::VALIDATION_OK));
383 } 383 }
384 384
385 } // namespace 385 } // namespace
386 386
387 } // namespace policy 387 } // namespace policy
OLDNEW
« no previous file with comments | « components/plugins/renderer/mobile_youtube_plugin.cc ('k') | components/policy/core/common/policy_loader_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698