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

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

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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/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"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/prefs/pref_service_mock_builder.h" 12 #include "chrome/browser/prefs/pref_service_mock_builder.h"
13 #include "chrome/browser/prefs/testing_pref_store.h" 13 #include "chrome/browser/prefs/testing_pref_store.h"
14 #include "chrome/browser/signin/signin_manager_fake.h" 14 #include "chrome/browser/signin/signin_manager_fake.h"
15 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" 15 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
16 #include "chrome/browser/sync/profile_sync_service.h" 16 #include "chrome/browser/sync/profile_sync_service.h"
17 #include "chrome/browser/sync/profile_sync_service_factory.h" 17 #include "chrome/browser/sync/profile_sync_service_factory.h"
18 #include "chrome/browser/sync/sync_setup_flow.h" 18 #include "chrome/browser/sync/sync_setup_flow.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/browser_list.h" 20 #include "chrome/browser/ui/browser_list.h"
21 #include "chrome/browser/ui/webui/options/options_sync_setup_handler.h" 21 #include "chrome/browser/ui/webui/options2/options_sync_setup_handler.h"
22 #include "chrome/common/net/gaia/google_service_auth_error.h" 22 #include "chrome/common/net/gaia/google_service_auth_error.h"
23 #include "chrome/common/pref_names.h" 23 #include "chrome/common/pref_names.h"
24 #include "chrome/test/base/browser_with_test_window_test.h" 24 #include "chrome/test/base/browser_with_test_window_test.h"
25 #include "chrome/test/base/test_browser_window.h" 25 #include "chrome/test/base/test_browser_window.h"
26 #include "chrome/test/base/testing_profile.h" 26 #include "chrome/test/base/testing_profile.h"
27 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
28 28
29 static const char kTestUser[] = "chrome.p13n.test@gmail.com"; 29 static const char kTestUser[] = "chrome.p13n.test@gmail.com";
30 30
31 typedef GoogleServiceAuthError AuthError; 31 typedef GoogleServiceAuthError AuthError;
32 32
33 class MockSyncSetupHandler : public OptionsSyncSetupHandler { 33 class MockSyncSetupHandler : public options2::OptionsSyncSetupHandler {
34 public: 34 public:
35 explicit MockSyncSetupHandler(Profile* profile) 35 explicit MockSyncSetupHandler(Profile* profile)
36 : OptionsSyncSetupHandler(NULL), 36 : OptionsSyncSetupHandler(NULL),
37 profile_(profile) {} 37 profile_(profile) {}
38 38
39 // SyncSetupFlowHandler implementation. 39 // SyncSetupFlowHandler implementation.
40 virtual void ShowFatalError() OVERRIDE { 40 virtual void ShowFatalError() OVERRIDE {
41 ShowSetupDone(string16()); 41 ShowSetupDone(string16());
42 } 42 }
43 virtual void ShowConfigure(const DictionaryValue& args) OVERRIDE {} 43 virtual void ShowConfigure(const DictionaryValue& args) OVERRIDE {}
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 class SyncSetupWizardCrosTest : public SyncSetupWizardTest { 414 class SyncSetupWizardCrosTest : public SyncSetupWizardTest {
415 public: 415 public:
416 virtual TestingProfile* BuildProfile() { 416 virtual TestingProfile* BuildProfile() {
417 TestingProfile* profile = new TestingProfile(); 417 TestingProfile* profile = new TestingProfile();
418 ProfileSyncServiceFactory* f = ProfileSyncServiceFactory::GetInstance(); 418 ProfileSyncServiceFactory* f = ProfileSyncServiceFactory::GetInstance();
419 f->SetTestingFactory(profile, ProfileSyncServiceForWizardTest::BuildAuto); 419 f->SetTestingFactory(profile, ProfileSyncServiceForWizardTest::BuildAuto);
420 f->GetForProfile(profile)->signin()->SetAuthenticatedUsername(kTestUser); 420 f->GetForProfile(profile)->signin()->SetAuthenticatedUsername(kTestUser);
421 return profile; 421 return profile;
422 } 422 }
423 }; 423 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698