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

Side by Side Diff: chrome/browser/google_apis/test_util.h

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 #ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_
6 #define CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ 6 #define CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "chrome/browser/google_apis/gdata_errorcode.h" 11 #include "chrome/browser/google_apis/gdata_errorcode.h"
12 #include "googleurl/src/gurl.h"
12 13
13 class FilePath; 14 class FilePath;
14 15
15 namespace base { 16 namespace base {
16 class Value; 17 class Value;
17 } 18 }
18 19
19 namespace google_apis { 20 namespace google_apis {
20 21
21 class AccountMetadataFeed; 22 class AccountMetadataFeed;
(...skipping 12 matching lines...) Expand all
34 // A task is often posted to the blocking pool with PostTaskAndReply(). In 35 // A task is often posted to the blocking pool with PostTaskAndReply(). In
35 // that case, a task is posted back to the UI message loop, which can again 36 // that case, a task is posted back to the UI message loop, which can again
36 // post a task to the blocking pool. This function processes these tasks 37 // post a task to the blocking pool. This function processes these tasks
37 // repeatedly. 38 // repeatedly.
38 void RunBlockingPoolTask(); 39 void RunBlockingPoolTask();
39 40
40 // Returns the absolute path for a test file stored under 41 // Returns the absolute path for a test file stored under
41 // chrome/test/data/chromeos. 42 // chrome/test/data/chromeos.
42 FilePath GetTestFilePath(const std::string& relative_path); 43 FilePath GetTestFilePath(const std::string& relative_path);
43 44
45 // Returns the base URL for communicating with the local test server for
46 // testing, running at the specified port number.
47 GURL GetBaseUrlForTesting(int port);
48
44 // Loads a test JSON file as a base::Value, from a test file stored under 49 // Loads a test JSON file as a base::Value, from a test file stored under
45 // chrome/test/data/chromeos. 50 // chrome/test/data/chromeos.
46 scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path); 51 scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path);
47 52
48 // Copies the results from EntryActionCallback. 53 // Copies the results from EntryActionCallback.
49 void CopyResultsFromEntryActionCallback(GDataErrorCode* error_out, 54 void CopyResultsFromEntryActionCallback(GDataErrorCode* error_out,
50 GDataErrorCode error_in); 55 GDataErrorCode error_in);
51 56
52 // Copies the results from GetDataCallback. 57 // Copies the results from GetDataCallback.
53 void CopyResultsFromGetDataCallback(GDataErrorCode* error_out, 58 void CopyResultsFromGetDataCallback(GDataErrorCode* error_out,
(...skipping 23 matching lines...) Expand all
77 scoped_ptr<AccountMetadataFeed> account_metadata_in); 82 scoped_ptr<AccountMetadataFeed> account_metadata_in);
78 83
79 // Returns a HttpResponse created from the given file path. 84 // Returns a HttpResponse created from the given file path.
80 scoped_ptr<test_server::HttpResponse> CreateHttpResponseFromFile( 85 scoped_ptr<test_server::HttpResponse> CreateHttpResponseFromFile(
81 const FilePath& file_path); 86 const FilePath& file_path);
82 87
83 } // namespace test_util 88 } // namespace test_util
84 } // namespace google_apis 89 } // namespace google_apis
85 90
86 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ 91 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc ('k') | chrome/browser/google_apis/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698