Index: chrome/browser/google_apis/test_util.h |
diff --git a/chrome/browser/google_apis/test_util.h b/chrome/browser/google_apis/test_util.h |
index e0ba436be585eaeff2899f164557535647d998a0..48890eb5c73398f7418698fa2aea4d68eb470604 100644 |
--- a/chrome/browser/google_apis/test_util.h |
+++ b/chrome/browser/google_apis/test_util.h |
@@ -26,6 +26,7 @@ class ResourceEntry; |
class ResourceList; |
namespace test_server { |
+struct HttpRequest; |
class HttpResponse; |
} |
@@ -40,6 +41,12 @@ namespace test_util { |
// repeatedly. |
void RunBlockingPoolTask(); |
+// Removes |prefix| from |input| and stores the result in |output|. Returns |
+// true if the prefix is removed. |
+bool RemovePrefix(const std::string& input, |
+ const std::string& prefix, |
+ std::string* output); |
+ |
// Returns the absolute path for a test file stored under |
// chrome/test/data/chromeos. |
FilePath GetTestFilePath(const std::string& relative_path); |
@@ -117,6 +124,15 @@ scoped_ptr<test_server::HttpResponse> CreateHttpResponseFromFile( |
void DoNothingForReAuthenticateCallback( |
AuthenticatedOperationInterface* operation); |
+// Handles a request for downloading a file. Reads a file from the test |
+// directory and returns the content. Also, copies the |request| to the memory |
+// pointed by |out_request|. |
+// |base_url| must be set to the server's base url. |
+scoped_ptr<test_server::HttpResponse> HandleDownloadRequest( |
+ const GURL& base_url, |
+ test_server::HttpRequest* out_request, |
+ const test_server::HttpRequest& request); |
+ |
// Returns true if |json_data| is not NULL and equals to the content in |
// |expected_json_file_path|. The failure reason will be logged into LOG(ERROR) |
// if necessary. |