| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/files_list_request_runner.h" | 5 #include "google_apis/drive/files_list_request_runner.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 message_loop_.task_runner(), kTestUserAgent)); | 73 message_loop_.task_runner(), kTestUserAgent)); |
| 74 | 74 |
| 75 test_server_.RegisterRequestHandler( | 75 test_server_.RegisterRequestHandler( |
| 76 base::Bind(&FilesListRequestRunnerTest::OnFilesListRequest, | 76 base::Bind(&FilesListRequestRunnerTest::OnFilesListRequest, |
| 77 base::Unretained(this), test_server_.base_url())); | 77 base::Unretained(this), test_server_.base_url())); |
| 78 ASSERT_TRUE(test_server_.Start()); | 78 ASSERT_TRUE(test_server_.Start()); |
| 79 | 79 |
| 80 runner_.reset(new FilesListRequestRunner( | 80 runner_.reset(new FilesListRequestRunner( |
| 81 request_sender_.get(), | 81 request_sender_.get(), |
| 82 google_apis::DriveApiUrlGenerator(test_server_.base_url(), | 82 google_apis::DriveApiUrlGenerator(test_server_.base_url(), |
| 83 test_server_.GetURL("/download/"), | |
| 84 test_server_.GetURL("/thumbnail/")))); | 83 test_server_.GetURL("/thumbnail/")))); |
| 85 } | 84 } |
| 86 | 85 |
| 87 void TearDown() override { | 86 void TearDown() override { |
| 88 on_completed_callback_ = base::Closure(); | 87 on_completed_callback_ = base::Closure(); |
| 89 http_request_.reset(); | 88 http_request_.reset(); |
| 90 response_error_.reset(); | 89 response_error_.reset(); |
| 91 response_entry_.reset(); | 90 response_entry_.reset(); |
| 92 } | 91 } |
| 93 | 92 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 http_request_->relative_url); | 266 http_request_->relative_url); |
| 268 | 267 |
| 269 // There must be no backoff in case of an error different than | 268 // There must be no backoff in case of an error different than |
| 270 // DRIVE_RESPONSE_TOO_LARGE. | 269 // DRIVE_RESPONSE_TOO_LARGE. |
| 271 ASSERT_TRUE(response_error_.get()); | 270 ASSERT_TRUE(response_error_.get()); |
| 272 EXPECT_EQ(DRIVE_NO_SPACE, *response_error_); | 271 EXPECT_EQ(DRIVE_NO_SPACE, *response_error_); |
| 273 EXPECT_FALSE(response_entry_.get()); | 272 EXPECT_FALSE(response_entry_.get()); |
| 274 } | 273 } |
| 275 | 274 |
| 276 } // namespace google_apis | 275 } // namespace google_apis |
| OLD | NEW |