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

Side by Side Diff: google_apis/gaia/gaia_auth_fetcher_unittest.cc

Issue 498123003: Remove implicit conversions from scoped_refptr to T* in google_apis/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « google_apis/drive/request_sender.h ('k') | google_apis/gaia/gaia_oauth_client_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // A complete set of unit tests for GaiaAuthFetcher. 5 // A complete set of unit tests for GaiaAuthFetcher.
6 // Originally ported from GoogleAuthenticator tests. 6 // Originally ported from GoogleAuthenticator tests.
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 GURL issue_auth_token_source_; 147 GURL issue_auth_token_source_;
148 GURL client_login_to_oauth2_source_; 148 GURL client_login_to_oauth2_source_;
149 GURL oauth2_token_source_; 149 GURL oauth2_token_source_;
150 GURL token_auth_source_; 150 GURL token_auth_source_;
151 GURL merge_session_source_; 151 GURL merge_session_source_;
152 GURL uberauth_token_source_; 152 GURL uberauth_token_source_;
153 GURL oauth_login_gurl_; 153 GURL oauth_login_gurl_;
154 154
155 protected: 155 protected:
156 net::TestURLRequestContextGetter* GetRequestContext() { 156 net::TestURLRequestContextGetter* GetRequestContext() {
157 if (!request_context_getter_) { 157 if (!request_context_getter_.get()) {
158 request_context_getter_ = new net::TestURLRequestContextGetter( 158 request_context_getter_ = new net::TestURLRequestContextGetter(
159 message_loop_.message_loop_proxy()); 159 message_loop_.message_loop_proxy());
160 } 160 }
161 return request_context_getter_; 161 return request_context_getter_.get();
162 } 162 }
163 163
164 base::MessageLoop message_loop_; 164 base::MessageLoop message_loop_;
165 scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_; 165 scoped_refptr<net::TestURLRequestContextGetter> request_context_getter_;
166 }; 166 };
167 167
168 class MockGaiaConsumer : public GaiaAuthConsumer { 168 class MockGaiaConsumer : public GaiaAuthConsumer {
169 public: 169 public:
170 MockGaiaConsumer() {} 170 MockGaiaConsumer() {}
171 ~MockGaiaConsumer() {} 171 ~MockGaiaConsumer() {}
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 MockGaiaConsumer consumer; 799 MockGaiaConsumer consumer;
800 EXPECT_CALL(consumer, OnGetCheckConnectionInfoSuccess(data)).Times(1); 800 EXPECT_CALL(consumer, OnGetCheckConnectionInfoSuccess(data)).Times(1);
801 801
802 GaiaAuthFetcher auth(&consumer, std::string(), GetRequestContext()); 802 GaiaAuthFetcher auth(&consumer, std::string(), GetRequestContext());
803 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0); 803 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
804 MockFetcher mock_fetcher( 804 MockFetcher mock_fetcher(
805 GaiaUrls::GetInstance()->get_check_connection_info_url(), 805 GaiaUrls::GetInstance()->get_check_connection_info_url(),
806 status, net::HTTP_OK, cookies_, data, net::URLFetcher::GET, &auth); 806 status, net::HTTP_OK, cookies_, data, net::URLFetcher::GET, &auth);
807 auth.OnURLFetchComplete(&mock_fetcher); 807 auth.OnURLFetchComplete(&mock_fetcher);
808 } 808 }
OLDNEW
« no previous file with comments | « google_apis/drive/request_sender.h ('k') | google_apis/gaia/gaia_oauth_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698