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

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

Issue 548343004: Move chrome/test/data/gdata/testfile.txt to chrome/test/data/drive (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_requests_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "google_apis/drive/dummy_auth_service.h" 8 #include "google_apis/drive/dummy_auth_service.h"
9 #include "google_apis/drive/gdata_wapi_parser.h" 9 #include "google_apis/drive/gdata_wapi_parser.h"
10 #include "google_apis/drive/gdata_wapi_requests.h" 10 #include "google_apis/drive/gdata_wapi_requests.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 test_util::CreateHttpResponseFromFile( 67 test_util::CreateHttpResponseFromFile(
68 test_util::GetTestFilePath("gdata/file_entry.json"))); 68 test_util::GetTestFilePath("gdata/file_entry.json")));
69 return result.PassAs<net::test_server::HttpResponse>(); 69 return result.PassAs<net::test_server::HttpResponse>();
70 } else if (resource_id == "invalid_resource_id") { 70 } else if (resource_id == "invalid_resource_id") {
71 // Check if this is an authorization request for an app. 71 // Check if this is an authorization request for an app.
72 // This emulates to return invalid formatted result from the server. 72 // This emulates to return invalid formatted result from the server.
73 if (request.method == net::test_server::METHOD_PUT && 73 if (request.method == net::test_server::METHOD_PUT &&
74 request.content.find("<docs:authorizedApp>") != std::string::npos) { 74 request.content.find("<docs:authorizedApp>") != std::string::npos) {
75 scoped_ptr<net::test_server::BasicHttpResponse> result( 75 scoped_ptr<net::test_server::BasicHttpResponse> result(
76 test_util::CreateHttpResponseFromFile( 76 test_util::CreateHttpResponseFromFile(
77 test_util::GetTestFilePath("gdata/testfile.txt"))); 77 test_util::GetTestFilePath("drive/testfile.txt")));
78 return result.PassAs<net::test_server::HttpResponse>(); 78 return result.PassAs<net::test_server::HttpResponse>();
79 } 79 }
80 } 80 }
81 81
82 return scoped_ptr<net::test_server::HttpResponse>(); 82 return scoped_ptr<net::test_server::HttpResponse>();
83 } 83 }
84 84
85 base::MessageLoopForIO message_loop_; // Test server needs IO thread. 85 base::MessageLoopForIO message_loop_; // Test server needs IO thread.
86 net::test_server::EmbeddedTestServer test_server_; 86 net::test_server::EmbeddedTestServer test_server_;
87 scoped_ptr<RequestSender> request_sender_; 87 scoped_ptr<RequestSender> request_sender_;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 144
145 EXPECT_EQ(HTTP_NOT_FOUND, result_code); 145 EXPECT_EQ(HTTP_NOT_FOUND, result_code);
146 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method); 146 EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
147 EXPECT_EQ("/feeds/default/private/full/%3Cinvalid%3E?v=3&alt=json" 147 EXPECT_EQ("/feeds/default/private/full/%3Cinvalid%3E?v=3&alt=json"
148 "&showroot=true", 148 "&showroot=true",
149 http_request_.relative_url); 149 http_request_.relative_url);
150 ASSERT_FALSE(result_data); 150 ASSERT_FALSE(result_data);
151 } 151 }
152 152
153 } // namespace google_apis 153 } // namespace google_apis
OLDNEW
« no previous file with comments | « google_apis/drive/drive_api_requests_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698