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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 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.h" 9 #include "base/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 96
97 void set_ubertoken_error( 97 void set_ubertoken_error(
98 GoogleServiceAuthError::State ubertoken_error_state) { 98 GoogleServiceAuthError::State ubertoken_error_state) {
99 ubertoken_error_state_ = ubertoken_error_state; 99 ubertoken_error_state_ = ubertoken_error_state;
100 } 100 }
101 101
102 protected: 102 protected:
103 testing::StrictMock<MockGaiaWebAuthFlowDelegate> delegate_; 103 testing::StrictMock<MockGaiaWebAuthFlowDelegate> delegate_;
104 GoogleServiceAuthError::State ubertoken_error_state_; 104 GoogleServiceAuthError::State ubertoken_error_state_;
105 MessageLoop message_loop_; 105 base::MessageLoop message_loop_;
106 content::TestBrowserThread fake_ui_thread_; 106 content::TestBrowserThread fake_ui_thread_;
107 }; 107 };
108 108
109 TEST_F(IdentityGaiaWebAuthFlowTest, OAuthError) { 109 TEST_F(IdentityGaiaWebAuthFlowTest, OAuthError) {
110 scoped_ptr<TestGaiaWebAuthFlow> flow = CreateTestFlow(); 110 scoped_ptr<TestGaiaWebAuthFlow> flow = CreateTestFlow();
111 flow->Start(); 111 flow->Start();
112 EXPECT_CALL(delegate_, OnGaiaFlowFailure( 112 EXPECT_CALL(delegate_, OnGaiaFlowFailure(
113 GaiaWebAuthFlow::OAUTH_ERROR, 113 GaiaWebAuthFlow::OAUTH_ERROR,
114 GoogleServiceAuthError(GoogleServiceAuthError::NONE), 114 GoogleServiceAuthError(GoogleServiceAuthError::NONE),
115 "access_denied")); 115 "access_denied"));
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 EXPECT_CALL( 238 EXPECT_CALL(
239 delegate_, 239 delegate_,
240 OnGaiaFlowFailure( 240 OnGaiaFlowFailure(
241 GaiaWebAuthFlow::WINDOW_CLOSED, 241 GaiaWebAuthFlow::WINDOW_CLOSED,
242 GoogleServiceAuthError(GoogleServiceAuthError::NONE), 242 GoogleServiceAuthError(GoogleServiceAuthError::NONE),
243 "")); 243 ""));
244 flow->OnAuthFlowFailure(WebAuthFlow::WINDOW_CLOSED); 244 flow->OnAuthFlowFailure(WebAuthFlow::WINDOW_CLOSED);
245 } 245 }
246 246
247 } // namespace extensions 247 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698