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

Side by Side Diff: chrome/browser/extensions/api/identity/gaia_web_auth_flow_unittest.cc

Issue 293063002: Multiple account support in chrome.identity.getAuthToken (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use full name of enable-new-profile-management Created 6 years, 6 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h" 5 #include "chrome/browser/extensions/api/identity/gaia_web_auth_flow.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 15 matching lines...) Expand all
26 }; 26 };
27 27
28 class TestGaiaWebAuthFlow : public GaiaWebAuthFlow { 28 class TestGaiaWebAuthFlow : public GaiaWebAuthFlow {
29 public: 29 public:
30 TestGaiaWebAuthFlow(GaiaWebAuthFlow::Delegate* delegate, 30 TestGaiaWebAuthFlow(GaiaWebAuthFlow::Delegate* delegate,
31 const std::string& extension_id, 31 const std::string& extension_id,
32 const OAuth2Info& oauth2_info, 32 const OAuth2Info& oauth2_info,
33 GoogleServiceAuthError::State ubertoken_error_state) 33 GoogleServiceAuthError::State ubertoken_error_state)
34 : GaiaWebAuthFlow(delegate, 34 : GaiaWebAuthFlow(delegate,
35 NULL, 35 NULL,
36 "account_id",
36 "extension_id", 37 "extension_id",
37 oauth2_info, 38 oauth2_info,
38 "en-us"), 39 "en-us"),
39 ubertoken_error_(ubertoken_error_state) {} 40 ubertoken_error_(ubertoken_error_state) {}
40 41
41 virtual void Start() OVERRIDE { 42 virtual void Start() OVERRIDE {
42 if (ubertoken_error_.state() == GoogleServiceAuthError::NONE) 43 if (ubertoken_error_.state() == GoogleServiceAuthError::NONE)
43 OnUbertokenSuccess("fake_ubertoken"); 44 OnUbertokenSuccess("fake_ubertoken");
44 else 45 else
45 OnUbertokenFailure(ubertoken_error_); 46 OnUbertokenFailure(ubertoken_error_);
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 EXPECT_CALL( 236 EXPECT_CALL(
236 delegate_, 237 delegate_,
237 OnGaiaFlowFailure( 238 OnGaiaFlowFailure(
238 GaiaWebAuthFlow::WINDOW_CLOSED, 239 GaiaWebAuthFlow::WINDOW_CLOSED,
239 GoogleServiceAuthError(GoogleServiceAuthError::NONE), 240 GoogleServiceAuthError(GoogleServiceAuthError::NONE),
240 "")); 241 ""));
241 flow->OnAuthFlowFailure(WebAuthFlow::WINDOW_CLOSED); 242 flow->OnAuthFlowFailure(WebAuthFlow::WINDOW_CLOSED);
242 } 243 }
243 244
244 } // namespace extensions 245 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/identity/gaia_web_auth_flow.cc ('k') | chrome/browser/extensions/api/identity/identity_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698