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

Side by Side Diff: chrome/browser/sync/test/engine/mock_gaia_authenticator.cc

Issue 7828055: Move sync test code out of chrome/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Use MockGaiaAuthenticator to test your application by faking a login session. 5 // Use MockGaiaAuthenticator to test your application by faking a login session.
6 // This mock object should be initialized with the response you expect it to 6 // This mock object should be initialized with the response you expect it to
7 // return, and then can be used in exactly the same way as the real 7 // return, and then can be used in exactly the same way as the real
8 // GaiaAuthenticator. 8 // GaiaAuthenticator.
9 9
10 #include "chrome/test/sync/engine/mock_gaia_authenticator.h" 10 #include "chrome/browser/sync/test/engine/mock_gaia_authenticator.h"
11 11
12 using std::string; 12 using std::string;
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 15
16 MockGaiaAuthenticator::MockGaiaAuthenticator(const char* user_agent, 16 MockGaiaAuthenticator::MockGaiaAuthenticator(const char* user_agent,
17 const char* service_id, 17 const char* service_id,
18 const char* gaia_url) : 18 const char* gaia_url) :
19 should_save_credentials_(false), current_user_("") { 19 should_save_credentials_(false), current_user_("") {
20 // This discards user_agent, service_id, gaia_url since the mock object 20 // This discards user_agent, service_id, gaia_url since the mock object
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return (current_user_.empty()) ? "" : 143 return (current_user_.empty()) ? "" :
144 mock_credentials_[current_user_].captcha_token; 144 mock_credentials_[current_user_].captcha_token;
145 } 145 }
146 146
147 std::string MockGaiaAuthenticator::captcha_url() { 147 std::string MockGaiaAuthenticator::captcha_url() {
148 return (current_user_.empty()) ? "" : 148 return (current_user_.empty()) ? "" :
149 mock_credentials_[current_user_].captcha_url; 149 mock_credentials_[current_user_].captcha_url;
150 } 150 }
151 151
152 } // namespace browser_sync 152 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698