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

Unified Diff: chrome/common/net/gaia/gaia_authenticator2_unittest.h

Issue 3024002: Add IssueAuthToken support to the TokenService. (Closed)
Patch Set: Code review fixes Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/net/gaia/gaia_authenticator2.cc ('k') | chrome/common/net/gaia/gaia_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/net/gaia/gaia_authenticator2_unittest.h
diff --git a/chrome/common/net/gaia/gaia_authenticator2_unittest.h b/chrome/common/net/gaia/gaia_authenticator2_unittest.h
index d392ee83deb6963bc9357b2a2176b2ba336a934c..97704f89cc3d4d0a1fabbf8f0582e96ad705c019 100644
--- a/chrome/common/net/gaia/gaia_authenticator2_unittest.h
+++ b/chrome/common/net/gaia/gaia_authenticator2_unittest.h
@@ -8,6 +8,8 @@
#ifndef CHROME_COMMON_NET_GAIA_GAIA_AUTHENTICATOR2_UNITTEST_H_
#define CHROME_COMMON_NET_GAIA_GAIA_AUTHENTICATOR2_UNITTEST_H_
+#include <string>
+
#include "chrome/common/net/gaia/gaia_authenticator2.h"
#include "chrome/common/net/url_fetcher.h"
#include "chrome/common/net/http_return.h"
@@ -18,11 +20,13 @@ class MockFetcher : public URLFetcher {
public:
MockFetcher(bool success,
const GURL& url,
+ const std::string & results,
URLFetcher::RequestType request_type,
URLFetcher::Delegate* d)
: URLFetcher(url, request_type, d),
success_(success),
- url_(url) {}
+ url_(url),
+ results_(results) {}
~MockFetcher() {}
void Start() {
URLRequestStatus::Status code;
@@ -41,11 +45,12 @@ class MockFetcher : public URLFetcher {
status,
http_code,
ResponseCookies(),
- std::string());
+ results_);
}
private:
bool success_;
GURL url_;
+ std::string results_;
DISALLOW_COPY_AND_ASSIGN(MockFetcher);
};
@@ -58,13 +63,17 @@ class MockFactory : public URLFetcher::Factory {
const GURL& url,
URLFetcher::RequestType request_type,
URLFetcher::Delegate* d) {
- return new MockFetcher(success_, url, request_type, d);
+ return new MockFetcher(success_, url, results_, request_type, d);
}
void set_success(bool success) {
success_ = success;
}
+ void set_results(const std::string& results) {
+ results_ = results;
+ }
private:
bool success_;
+ std::string results_;
DISALLOW_COPY_AND_ASSIGN(MockFactory);
};
« no previous file with comments | « chrome/common/net/gaia/gaia_authenticator2.cc ('k') | chrome/common/net/gaia/gaia_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698