Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: google_apis/drive/files_list_request_runner_unittest.cc

Issue 1965963003: Use new API to download blobs from Google Drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « google_apis/drive/drive_api_url_generator_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « google_apis/drive/drive_api_url_generator_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698