| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/files/file_path.h" | 6 #include "base/files/file_path.h" |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/google_apis/drive_api_operations.h" | 10 #include "chrome/browser/google_apis/drive_api_operations.h" |
| 11 #include "chrome/browser/google_apis/drive_api_parser.h" | 11 #include "chrome/browser/google_apis/drive_api_parser.h" |
| 12 #include "chrome/browser/google_apis/drive_api_url_generator.h" | 12 #include "chrome/browser/google_apis/drive_api_url_generator.h" |
| 13 #include "chrome/browser/google_apis/operation_registry.h" | 13 #include "chrome/browser/google_apis/operation_registry.h" |
| 14 #include "chrome/browser/google_apis/task_util.h" | 14 #include "chrome/browser/google_apis/task_util.h" |
| 15 #include "chrome/browser/google_apis/test_server/http_request.h" | |
| 16 #include "chrome/browser/google_apis/test_server/http_response.h" | |
| 17 #include "chrome/browser/google_apis/test_server/http_server.h" | |
| 18 #include "chrome/browser/google_apis/test_util.h" | 15 #include "chrome/browser/google_apis/test_util.h" |
| 19 #include "content/public/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
| 17 #include "net/test/embedded_test_server/http_request.h" |
| 18 #include "net/test/embedded_test_server/http_response.h" |
| 19 #include "net/test/embedded_test_server/http_server.h" |
| 20 #include "net/url_request/url_request_test_util.h" | 20 #include "net/url_request/url_request_test_util.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 namespace google_apis { | 23 namespace google_apis { |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 const char kTestDriveApiAuthToken[] = "testtoken"; | 27 const char kTestDriveApiAuthToken[] = "testtoken"; |
| 28 const char kTestETag[] = "test_etag"; | 28 const char kTestETag[] = "test_etag"; |
| 29 const char kTestUserAgent[] = "test-user-agent"; | 29 const char kTestUserAgent[] = "test-user-agent"; |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 EXPECT_EQ("Conflicting-etag", http_request_.headers["If-Match"]); | 1171 EXPECT_EQ("Conflicting-etag", http_request_.headers["If-Match"]); |
| 1172 | 1172 |
| 1173 EXPECT_EQ(test_server::METHOD_PUT, http_request_.method); | 1173 EXPECT_EQ(test_server::METHOD_PUT, http_request_.method); |
| 1174 EXPECT_EQ("/upload/drive/v2/files/resource_id?uploadType=resumable", | 1174 EXPECT_EQ("/upload/drive/v2/files/resource_id?uploadType=resumable", |
| 1175 http_request_.relative_url); | 1175 http_request_.relative_url); |
| 1176 EXPECT_TRUE(http_request_.has_content); | 1176 EXPECT_TRUE(http_request_.has_content); |
| 1177 EXPECT_TRUE(http_request_.content.empty()); | 1177 EXPECT_TRUE(http_request_.content.empty()); |
| 1178 } | 1178 } |
| 1179 | 1179 |
| 1180 } // namespace google_apis | 1180 } // namespace google_apis |
| OLD | NEW |