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("/thumbnail/")))); | 83 test_server_.GetURL("/thumbnail/"), |
| 84 TEAM_DRIVES_INTEGRATION_DISABLED))); |
84 } | 85 } |
85 | 86 |
86 void TearDown() override { | 87 void TearDown() override { |
87 on_completed_callback_ = base::Closure(); | 88 on_completed_callback_ = base::Closure(); |
88 http_request_.reset(); | 89 http_request_.reset(); |
89 response_error_.reset(); | 90 response_error_.reset(); |
90 response_entry_.reset(); | 91 response_entry_.reset(); |
91 } | 92 } |
92 | 93 |
93 // Called when the request is completed and no more backoff retries will | 94 // Called when the request is completed and no more backoff retries will |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 http_request_->relative_url); | 267 http_request_->relative_url); |
267 | 268 |
268 // There must be no backoff in case of an error different than | 269 // There must be no backoff in case of an error different than |
269 // DRIVE_RESPONSE_TOO_LARGE. | 270 // DRIVE_RESPONSE_TOO_LARGE. |
270 ASSERT_TRUE(response_error_.get()); | 271 ASSERT_TRUE(response_error_.get()); |
271 EXPECT_EQ(DRIVE_NO_SPACE, *response_error_); | 272 EXPECT_EQ(DRIVE_NO_SPACE, *response_error_); |
272 EXPECT_FALSE(response_entry_.get()); | 273 EXPECT_FALSE(response_entry_.get()); |
273 } | 274 } |
274 | 275 |
275 } // namespace google_apis | 276 } // namespace google_apis |
OLD | NEW |