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

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

Issue 15333013: Replace most of the occurrence of OperationRegistry with OperationRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 std::string* data); 85 std::string* data);
86 86
87 // Loads a test JSON file as a base::Value, from a test file stored under 87 // Loads a test JSON file as a base::Value, from a test file stored under
88 // chrome/test/data. 88 // chrome/test/data.
89 scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path); 89 scoped_ptr<base::Value> LoadJSONFile(const std::string& relative_path);
90 90
91 // Returns a HttpResponse created from the given file path. 91 // Returns a HttpResponse created from the given file path.
92 scoped_ptr<net::test_server::HttpResponse> CreateHttpResponseFromFile( 92 scoped_ptr<net::test_server::HttpResponse> CreateHttpResponseFromFile(
93 const base::FilePath& file_path); 93 const base::FilePath& file_path);
94 94
95 // Does nothing for ReAuthenticateCallback(). This function should be used
96 // if it is not expected to reach this method as there won't be any
97 // authentication failures in the test.
98 void DoNothingForReAuthenticateCallback(
99 AuthenticatedOperationInterface* operation);
100
101 // Handles a request for downloading a file. Reads a file from the test 95 // Handles a request for downloading a file. Reads a file from the test
102 // directory and returns the content. Also, copies the |request| to the memory 96 // directory and returns the content. Also, copies the |request| to the memory
103 // pointed by |out_request|. 97 // pointed by |out_request|.
104 // |base_url| must be set to the server's base url. 98 // |base_url| must be set to the server's base url.
105 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest( 99 scoped_ptr<net::test_server::HttpResponse> HandleDownloadRequest(
106 const GURL& base_url, 100 const GURL& base_url,
107 net::test_server::HttpRequest* out_request, 101 net::test_server::HttpRequest* out_request,
108 const net::test_server::HttpRequest& request); 102 const net::test_server::HttpRequest& request);
109 103
110 // Returns true if |json_data| is not NULL and equals to the content in 104 // Returns true if |json_data| is not NULL and equals to the content in
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 const GetContentCallback callback_; 305 const GetContentCallback callback_;
312 ScopedVector<std::string> data_; 306 ScopedVector<std::string> data_;
313 307
314 DISALLOW_COPY_AND_ASSIGN(TestGetContentCallback); 308 DISALLOW_COPY_AND_ASSIGN(TestGetContentCallback);
315 }; 309 };
316 310
317 } // namespace test_util 311 } // namespace test_util
318 } // namespace google_apis 312 } // namespace google_apis
319 313
320 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_ 314 #endif // CHROME_BROWSER_GOOGLE_APIS_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_service.cc ('k') | chrome/browser/google_apis/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698