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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_operations_unittest.cc

Issue 11804004: Add base_url to DriveApiUrlGenerator. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Introduce kBaseUrlForProduction in DriveApiUrlGenerator Created 7 years, 11 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
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 <algorithm> 5 #include <algorithm>
6 #include <map> 6 #include <map>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 base::Bind(&GDataWapiOperationsTest::HandleMetadataFeedRequest, 181 base::Bind(&GDataWapiOperationsTest::HandleMetadataFeedRequest,
182 base::Unretained(this))); 182 base::Unretained(this)));
183 test_server_.RegisterRequestHandler( 183 test_server_.RegisterRequestHandler(
184 base::Bind(&GDataWapiOperationsTest::HandleCreateSessionRequest, 184 base::Bind(&GDataWapiOperationsTest::HandleCreateSessionRequest,
185 base::Unretained(this))); 185 base::Unretained(this)));
186 test_server_.RegisterRequestHandler( 186 test_server_.RegisterRequestHandler(
187 base::Bind(&GDataWapiOperationsTest::HandleUploadRequest, 187 base::Bind(&GDataWapiOperationsTest::HandleUploadRequest,
188 base::Unretained(this))); 188 base::Unretained(this)));
189 189
190 url_generator_.reset(new GDataWapiUrlGenerator( 190 url_generator_.reset(new GDataWapiUrlGenerator(
191 GDataWapiUrlGenerator::GetBaseUrlForTesting(test_server_.port()))); 191 test_util::GetBaseUrlForTesting(test_server_.port())));
192 } 192 }
193 193
194 virtual void TearDown() OVERRIDE { 194 virtual void TearDown() OVERRIDE {
195 test_server_.ShutdownAndWaitUntilComplete(); 195 test_server_.ShutdownAndWaitUntilComplete();
196 request_context_getter_ = NULL; 196 request_context_getter_ = NULL;
197 } 197 }
198 198
199 protected: 199 protected:
200 // Returns a temporary file path suitable for storing the cache file. 200 // Returns a temporary file path suitable for storing the cache file.
201 FilePath GetTestCachedFilePath(const FilePath& file_name) { 201 FilePath GetTestCachedFilePath(const FilePath& file_name) {
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 EXPECT_EQ(base::Int64ToString(kUploadContent.size()), 1432 EXPECT_EQ(base::Int64ToString(kUploadContent.size()),
1433 http_request_.headers["X-Upload-Content-Length"]); 1433 http_request_.headers["X-Upload-Content-Length"]);
1434 // For updating an existing file, an empty body should be attached (PUT 1434 // For updating an existing file, an empty body should be attached (PUT
1435 // requires a body) 1435 // requires a body)
1436 EXPECT_TRUE(http_request_.has_content); 1436 EXPECT_TRUE(http_request_.has_content);
1437 EXPECT_EQ("", http_request_.content); 1437 EXPECT_EQ("", http_request_.content);
1438 EXPECT_EQ(kWrongETag, http_request_.headers["If-Match"]); 1438 EXPECT_EQ(kWrongETag, http_request_.headers["If-Match"]);
1439 } 1439 }
1440 1440
1441 } // namespace google_apis 1441 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_url_generator_unittest.cc ('k') | chrome/browser/google_apis/gdata_wapi_url_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698