| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/string_split.h" | 8 #include "base/string_split.h" |
| 9 #include "chrome/browser/browser_thread.h" | 9 #include "chrome/browser/browser_thread.h" |
| 10 #include "chrome/browser/policy/device_management_backend_impl.h" | 10 #include "chrome/browser/policy/device_management_backend_impl.h" |
| 11 #include "chrome/browser/policy/device_management_backend_mock.h" | 11 #include "chrome/browser/policy/device_management_backend_mock.h" |
| 12 #include "chrome/browser/policy/device_management_service.h" | 12 #include "chrome/browser/policy/device_management_service.h" |
| 13 #include "chrome/browser/policy/proto/device_management_constants.h" | 13 #include "chrome/browser/policy/proto/device_management_constants.h" |
| 14 #include "chrome/common/net/test_url_fetcher_factory.h" | 14 #include "chrome/common/net/test_url_fetcher_factory.h" |
| 15 #include "chrome/test/test_url_request_context_getter.h" | 15 #include "chrome/test/test_url_request_context_getter.h" |
| 16 #include "net/base/escape.h" | 16 #include "net/base/escape.h" |
| 17 #include "net/url_request/url_request_status.h" | 17 #include "net/url_request/url_request_status.h" |
| 18 #include "net/url_request/url_request_unittest.h" | 18 #include "net/url_request/url_request_test_util.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 | 21 |
| 22 using testing::_; | 22 using testing::_; |
| 23 | 23 |
| 24 namespace policy { | 24 namespace policy { |
| 25 | 25 |
| 26 const char kServiceUrl[] = "https://example.com/management_service"; | 26 const char kServiceUrl[] = "https://example.com/management_service"; |
| 27 | 27 |
| 28 // Encoded error response messages for testing the error code paths. | 28 // Encoded error response messages for testing the error code paths. |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); | 476 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); |
| 477 fetcher->delegate()->OnURLFetchComplete(fetcher, | 477 fetcher->delegate()->OnURLFetchComplete(fetcher, |
| 478 GURL(kServiceUrl), | 478 GURL(kServiceUrl), |
| 479 status, | 479 status, |
| 480 200, | 480 200, |
| 481 ResponseCookies(), | 481 ResponseCookies(), |
| 482 response_data); | 482 response_data); |
| 483 } | 483 } |
| 484 | 484 |
| 485 } // namespace policy | 485 } // namespace policy |
| OLD | NEW |