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

Side by Side Diff: chrome/browser/sync/sync_setup_wizard_unittest.cc

Issue 8589033: [Sync] Change std::wstring to string16 in SyncSetupFlowHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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) 2011 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/sync/sync_setup_wizard.h" 5 #include "chrome/browser/sync/sync_setup_wizard.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 17 matching lines...) Expand all
28 static const char kTestCaptcha[] = "pizzamyheart"; 28 static const char kTestCaptcha[] = "pizzamyheart";
29 static const char kTestCaptchaUrl[] = "http://pizzamyheart/"; 29 static const char kTestCaptchaUrl[] = "http://pizzamyheart/";
30 30
31 typedef GoogleServiceAuthError AuthError; 31 typedef GoogleServiceAuthError AuthError;
32 32
33 class MockSyncSetupHandler : public OptionsSyncSetupHandler { 33 class MockSyncSetupHandler : public OptionsSyncSetupHandler {
34 public: 34 public:
35 MockSyncSetupHandler() : OptionsSyncSetupHandler(NULL) {} 35 MockSyncSetupHandler() : OptionsSyncSetupHandler(NULL) {}
36 36
37 // SyncSetupFlowHandler implementation. 37 // SyncSetupFlowHandler implementation.
38 virtual void ShowGaiaLogin(const DictionaryValue& args) {} 38 virtual void ShowGaiaLogin(const DictionaryValue& args) OVERRIDE {}
39 virtual void ShowGaiaSuccessAndClose() { 39 virtual void ShowGaiaSuccessAndClose() OVERRIDE {
40 flow()->OnDialogClosed(""); 40 flow()->OnDialogClosed("");
41 } 41 }
42 virtual void ShowGaiaSuccessAndSettingUp() {} 42 virtual void ShowGaiaSuccessAndSettingUp() OVERRIDE {}
43 virtual void ShowConfigure(const DictionaryValue& args) {} 43 virtual void ShowConfigure(const DictionaryValue& args) OVERRIDE {}
44 virtual void ShowPassphraseEntry(const DictionaryValue& args) {} 44 virtual void ShowPassphraseEntry(const DictionaryValue& args) OVERRIDE {}
45 virtual void ShowSettingUp() {} 45 virtual void ShowSettingUp() OVERRIDE {}
46 virtual void ShowSetupDone(const std::wstring& user) { 46 virtual void ShowSetupDone(const string16& user) OVERRIDE {
47 flow()->OnDialogClosed(""); 47 flow()->OnDialogClosed("");
48 } 48 }
49 49
50 void CloseSetupUI() { 50 void CloseSetupUI() {
51 ShowSetupDone(std::wstring()); 51 ShowSetupDone(string16());
52 } 52 }
53 53
54 private: 54 private:
55 DISALLOW_COPY_AND_ASSIGN(MockSyncSetupHandler); 55 DISALLOW_COPY_AND_ASSIGN(MockSyncSetupHandler);
56 }; 56 };
57 57
58 // A PSS subtype to inject. 58 // A PSS subtype to inject.
59 class ProfileSyncServiceForWizardTest : public ProfileSyncService { 59 class ProfileSyncServiceForWizardTest : public ProfileSyncService {
60 public: 60 public:
61 ProfileSyncServiceForWizardTest(ProfileSyncFactory* factory, Profile* profile) 61 ProfileSyncServiceForWizardTest(ProfileSyncFactory* factory, Profile* profile)
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 608
609 service_->set_last_auth_error( 609 service_->set_last_auth_error(
610 AuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE)); 610 AuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE));
611 wizard_->Step(SyncSetupWizard::NONFATAL_ERROR); 611 wizard_->Step(SyncSetupWizard::NONFATAL_ERROR);
612 AttachSyncSetupHandler(); 612 AttachSyncSetupHandler();
613 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_); 613 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_);
614 EXPECT_EQ(SyncSetupWizard::DONE, flow_->end_state_); 614 EXPECT_EQ(SyncSetupWizard::DONE, flow_->end_state_);
615 CloseSetupUI(); 615 CloseSetupUI();
616 EXPECT_FALSE(wizard_->IsVisible()); 616 EXPECT_FALSE(wizard_->IsVisible());
617 } 617 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_flow_handler.h ('k') | chrome/browser/ui/webui/sync_setup_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698