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

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler_unittest.cc

Issue 240453006: Fix sign-in error strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put error in button Created 6 years, 7 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) 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 #include "chrome/browser/ui/webui/sync_setup_handler.h" 5 #include "chrome/browser/ui/webui/sync_setup_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 TEST_F(SyncSetupHandlerTest, ShowSigninOnAuthError) { 860 TEST_F(SyncSetupHandlerTest, ShowSigninOnAuthError) {
861 // Initialize the system to a signed in state, but with an auth error. 861 // Initialize the system to a signed in state, but with an auth error.
862 error_ = GoogleServiceAuthError( 862 error_ = GoogleServiceAuthError(
863 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); 863 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
864 864
865 SetupInitializedProfileSyncService(); 865 SetupInitializedProfileSyncService();
866 mock_signin_->SetAuthenticatedUsername(kTestUser); 866 mock_signin_->SetAuthenticatedUsername(kTestUser);
867 FakeAuthStatusProvider provider( 867 FakeAuthStatusProvider provider(
868 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get())-> 868 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_.get())->
869 signin_error_controller()); 869 signin_error_controller());
870 provider.SetAuthError(kTestUser, error_); 870 provider.SetAuthError(kTestUser, kTestUser, error_);
871 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()) 871 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn())
872 .WillRepeatedly(Return(true)); 872 .WillRepeatedly(Return(true));
873 EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable()) 873 EXPECT_CALL(*mock_pss_, IsOAuthRefreshTokenAvailable())
874 .WillRepeatedly(Return(true)); 874 .WillRepeatedly(Return(true));
875 EXPECT_CALL(*mock_pss_, IsPassphraseRequired()) 875 EXPECT_CALL(*mock_pss_, IsPassphraseRequired())
876 .WillRepeatedly(Return(false)); 876 .WillRepeatedly(Return(false));
877 EXPECT_CALL(*mock_pss_, IsUsingSecondaryPassphrase()) 877 EXPECT_CALL(*mock_pss_, IsUsingSecondaryPassphrase())
878 .WillRepeatedly(Return(false)); 878 .WillRepeatedly(Return(false));
879 EXPECT_CALL(*mock_pss_, sync_initialized()).WillRepeatedly(Return(false)); 879 EXPECT_CALL(*mock_pss_, sync_initialized()).WillRepeatedly(Return(false));
880 880
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 1040
1041 // This should display the sync setup dialog (not login). 1041 // This should display the sync setup dialog (not login).
1042 handler_->OpenSyncSetup(); 1042 handler_->OpenSyncSetup();
1043 1043
1044 ExpectConfig(); 1044 ExpectConfig();
1045 const TestWebUI::CallData& data = web_ui_.call_data()[0]; 1045 const TestWebUI::CallData& data = web_ui_.call_data()[0];
1046 base::DictionaryValue* dictionary; 1046 base::DictionaryValue* dictionary;
1047 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary)); 1047 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary));
1048 CheckBool(dictionary, "encryptAllData", true); 1048 CheckBool(dictionary, "encryptAllData", true);
1049 } 1049 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698