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

Unified Diff: google_apis/drive/base_requests_unittest.cc

Issue 944413003: Add support for setting properties to requests uploading contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/drive/base_requests.cc ('k') | google_apis/drive/drive_api_requests.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/base_requests_unittest.cc
diff --git a/google_apis/drive/base_requests_unittest.cc b/google_apis/drive/base_requests_unittest.cc
index 92ae948b5414a2f3fc454313628b0c3521c54ba3..2b780d13035d27e2d86e25109a1fa18b98b6b5f4 100644
--- a/google_apis/drive/base_requests_unittest.cc
+++ b/google_apis/drive/base_requests_unittest.cc
@@ -55,12 +55,9 @@ class FakeMultipartUploadRequest : public MultipartUploadRequestBase {
public:
FakeMultipartUploadRequest(
RequestSender* sender,
- const std::string& title,
- const std::string& parent_resource_id,
+ const std::string& metadata_json,
const std::string& content_type,
int64 content_length,
- const base::Time& modified_date,
- const base::Time& last_viewed_by_me_date,
const base::FilePath& local_file_path,
const FileResourceCallback& callback,
const google_apis::ProgressCallback& progress_callback,
@@ -68,12 +65,9 @@ class FakeMultipartUploadRequest : public MultipartUploadRequestBase {
std::string* upload_content_type,
std::string* upload_content_data)
: MultipartUploadRequestBase(sender,
- title,
- parent_resource_id,
+ metadata_json,
content_type,
content_length,
- modified_date,
- last_viewed_by_me_date,
local_file_path,
callback,
progress_callback),
@@ -203,8 +197,7 @@ TEST_F(MultipartUploadRequestBaseTest, Basic) {
std::string upload_content_type;
std::string upload_content_data;
scoped_ptr<FakeMultipartUploadRequest> request(new FakeMultipartUploadRequest(
- sender_.get(), "test.txt", "parent_id", "text/plain", 10, base::Time(),
- base::Time(), source_path,
+ sender_.get(), "{json:\"test\"}", "text/plain", 10, source_path,
test_util::CreateQuitCallback(
&run_loop, test_util::CreateCopyResultCallback(&error, &file)),
ProgressCallback(), test_server_.base_url(), &upload_content_type,
@@ -217,8 +210,7 @@ TEST_F(MultipartUploadRequestBaseTest, Basic) {
"--TESTBOUNDARY\n"
"Content-Type: application/json\n"
"\n"
- "{\"parents\":[{\"id\":\"parent_id\",\"kind\":\"drive#fileLink\"}],"
- "\"title\":\"test.txt\"}\n"
+ "{json:\"test\"}\n"
"--TESTBOUNDARY\n"
"Content-Type: text/plain\n"
"\n"
« no previous file with comments | « google_apis/drive/base_requests.cc ('k') | google_apis/drive/drive_api_requests.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698