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

Side by Side Diff: chrome/browser/chromeos/login/google_authenticator_unittest.cc

Issue 6166010: net: Remove typedef net::URLRequestStatus URLRequestStatus; (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/google_authenticator.h" 5 #include "chrome/browser/chromeos/login/google_authenticator.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 PrepForLogin(auth.get()); 485 PrepForLogin(auth.get());
486 EXPECT_CALL(*user_manager_.get(), IsKnownUser(username_)) 486 EXPECT_CALL(*user_manager_.get(), IsKnownUser(username_))
487 .WillOnce(Return(true)) 487 .WillOnce(Return(true))
488 .RetiresOnSaturation(); 488 .RetiresOnSaturation();
489 auth->OnClientLoginSuccess(result_); 489 auth->OnClientLoginSuccess(result_);
490 message_loop.RunAllPending(); 490 message_loop.RunAllPending();
491 } 491 }
492 492
493 TEST_F(GoogleAuthenticatorTest, CheckLocalaccount) { 493 TEST_F(GoogleAuthenticatorTest, CheckLocalaccount) {
494 GURL source(AuthResponseHandler::kTokenAuthUrl); 494 GURL source(AuthResponseHandler::kTokenAuthUrl);
495 URLRequestStatus status(URLRequestStatus::SUCCESS, 0); 495 net::URLRequestStatus status(net::URLRequestStatus::SUCCESS, 0);
496 496
497 MockConsumer consumer; 497 MockConsumer consumer;
498 EXPECT_CALL(consumer, OnLoginSuccess(username_, std::string(), _, false)) 498 EXPECT_CALL(consumer, OnLoginSuccess(username_, std::string(), _, false))
499 .Times(1) 499 .Times(1)
500 .RetiresOnSaturation(); 500 .RetiresOnSaturation();
501 EXPECT_CALL(*mock_library_, MountForBwsi(_)) 501 EXPECT_CALL(*mock_library_, MountForBwsi(_))
502 .WillOnce(Return(true)) 502 .WillOnce(Return(true))
503 .RetiresOnSaturation(); 503 .RetiresOnSaturation();
504 504
505 scoped_refptr<GoogleAuthenticator> auth(new GoogleAuthenticator(&consumer)); 505 scoped_refptr<GoogleAuthenticator> auth(new GoogleAuthenticator(&consumer));
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 // Post a task to cancel the login attempt. 733 // Post a task to cancel the login attempt.
734 CancelLogin(auth.get()); 734 CancelLogin(auth.get());
735 735
736 URLFetcher::set_factory(NULL); 736 URLFetcher::set_factory(NULL);
737 737
738 // Run the UI thread until we exit it gracefully. 738 // Run the UI thread until we exit it gracefully.
739 message_loop.Run(); 739 message_loop.Run();
740 } 740 }
741 741
742 } // namespace chromeos 742 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/cookie_fetcher_unittest.cc ('k') | chrome/browser/chromeos/login/mock_auth_response_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698