| 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);
|
| };
|
|
|
|
|