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

Side by Side Diff: chrome/browser/policy/device_management_service_unittest.cc

Issue 10664017: Introduce a new error code from the DM server - 402 - missing licenses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/serials/licenses// Created 8 years, 5 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 <ostream> 5 #include <ostream>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 FailedRequestParams( 268 FailedRequestParams(
269 DM_STATUS_TEMPORARY_UNAVAILABLE, 269 DM_STATUS_TEMPORARY_UNAVAILABLE,
270 net::URLRequestStatus::SUCCESS, 270 net::URLRequestStatus::SUCCESS,
271 404, 271 404,
272 PROTO_STRING(kResponseEmpty)), 272 PROTO_STRING(kResponseEmpty)),
273 FailedRequestParams( 273 FailedRequestParams(
274 DM_STATUS_SERVICE_ACTIVATION_PENDING, 274 DM_STATUS_SERVICE_ACTIVATION_PENDING,
275 net::URLRequestStatus::SUCCESS, 275 net::URLRequestStatus::SUCCESS,
276 412, 276 412,
277 PROTO_STRING(kResponseEmpty)), 277 PROTO_STRING(kResponseEmpty)),
278 FailedRequestParams(
279 DM_STATUS_MISSING_LICENSES,
280 net::URLRequestStatus::SUCCESS,
281 402,
282 PROTO_STRING(kResponseEmpty)),
278 // TODO(pastarmovj): Remove once DM server is deployed. 283 // TODO(pastarmovj): Remove once DM server is deployed.
279 FailedRequestParams( 284 FailedRequestParams(
280 DM_STATUS_SERVICE_ACTIVATION_PENDING, 285 DM_STATUS_SERVICE_ACTIVATION_PENDING,
281 net::URLRequestStatus::SUCCESS, 286 net::URLRequestStatus::SUCCESS,
282 491, 287 491,
283 PROTO_STRING(kResponseEmpty)))); 288 PROTO_STRING(kResponseEmpty))));
284 289
285 // Simple query parameter parser for testing. 290 // Simple query parameter parser for testing.
286 class QueryParams { 291 class QueryParams {
287 public: 292 public:
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 551
547 // Verify that a new URLFetcher was started that bypasses the proxy. 552 // Verify that a new URLFetcher was started that bypasses the proxy.
548 fetcher = factory_.GetFetcherByID(0); 553 fetcher = factory_.GetFetcherByID(0);
549 ASSERT_TRUE(fetcher); 554 ASSERT_TRUE(fetcher);
550 EXPECT_TRUE((fetcher->GetLoadFlags() & net::LOAD_BYPASS_PROXY) != 0); 555 EXPECT_TRUE((fetcher->GetLoadFlags() & net::LOAD_BYPASS_PROXY) != 0);
551 EXPECT_EQ(original_url, fetcher->GetOriginalURL()); 556 EXPECT_EQ(original_url, fetcher->GetOriginalURL());
552 EXPECT_EQ(upload_data, fetcher->upload_data()); 557 EXPECT_EQ(upload_data, fetcher->upload_data());
553 } 558 }
554 559
555 } // namespace policy 560 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_service.cc ('k') | chrome/browser/policy/device_token_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698