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 "google_apis/drive/drive_api_requests.h" | 5 #include "google_apis/drive/drive_api_requests.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 test_server_.RegisterRequestHandler( | 163 test_server_.RegisterRequestHandler( |
164 base::Bind(&DriveApiRequestsTest::HandleDownloadRequest, | 164 base::Bind(&DriveApiRequestsTest::HandleDownloadRequest, |
165 base::Unretained(this))); | 165 base::Unretained(this))); |
166 test_server_.RegisterRequestHandler( | 166 test_server_.RegisterRequestHandler( |
167 base::Bind(&DriveApiRequestsTest::HandleBatchUploadRequest, | 167 base::Bind(&DriveApiRequestsTest::HandleBatchUploadRequest, |
168 base::Unretained(this))); | 168 base::Unretained(this))); |
169 ASSERT_TRUE(test_server_.Start()); | 169 ASSERT_TRUE(test_server_.Start()); |
170 | 170 |
171 GURL test_base_url = test_util::GetBaseUrlForTesting(test_server_.port()); | 171 GURL test_base_url = test_util::GetBaseUrlForTesting(test_server_.port()); |
172 url_generator_.reset( | 172 url_generator_.reset( |
173 new DriveApiUrlGenerator(test_base_url, test_base_url)); | 173 new DriveApiUrlGenerator(test_base_url, test_base_url, |
| 174 TEAM_DRIVES_INTEGRATION_DISABLED)); |
174 | 175 |
175 // Reset the server's expected behavior just in case. | 176 // Reset the server's expected behavior just in case. |
176 ResetExpectedResponse(); | 177 ResetExpectedResponse(); |
177 received_bytes_ = 0; | 178 received_bytes_ = 0; |
178 content_length_ = 0; | 179 content_length_ = 0; |
179 | 180 |
180 // Testing properties used by multiple test cases. | 181 // Testing properties used by multiple test cases. |
181 drive::Property private_property; | 182 drive::Property private_property; |
182 private_property.set_key("key1"); | 183 private_property.set_key("key1"); |
183 private_property.set_value("value1"); | 184 private_property.set_value("value1"); |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2267 "Header: value\r\n" | 2268 "Header: value\r\n" |
2268 "\r\n" | 2269 "\r\n" |
2269 "BODY\r\n" | 2270 "BODY\r\n" |
2270 "--BOUNDARY-- \t", | 2271 "--BOUNDARY-- \t", |
2271 &parts)); | 2272 &parts)); |
2272 ASSERT_EQ(1u, parts.size()); | 2273 ASSERT_EQ(1u, parts.size()); |
2273 EXPECT_EQ(HTTP_SUCCESS, parts[0].code); | 2274 EXPECT_EQ(HTTP_SUCCESS, parts[0].code); |
2274 EXPECT_EQ("BODY", parts[0].body); | 2275 EXPECT_EQ("BODY", parts[0].body); |
2275 } | 2276 } |
2276 } // namespace google_apis | 2277 } // namespace google_apis |
OLD | NEW |