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

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

Issue 3305003: New authorization framework for sync. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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) 2010 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/scoped_ptr.h" 8 #include "base/scoped_ptr.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 14 matching lines...) Expand all
25 static const char kTestPassword[] = "passwd"; 25 static const char kTestPassword[] = "passwd";
26 static const char kTestCaptcha[] = "pizzamyheart"; 26 static const char kTestCaptcha[] = "pizzamyheart";
27 static const char kTestCaptchaUrl[] = "http://pizzamyheart/"; 27 static const char kTestCaptchaUrl[] = "http://pizzamyheart/";
28 28
29 typedef GoogleServiceAuthError AuthError; 29 typedef GoogleServiceAuthError AuthError;
30 30
31 // A PSS subtype to inject. 31 // A PSS subtype to inject.
32 class ProfileSyncServiceForWizardTest : public ProfileSyncService { 32 class ProfileSyncServiceForWizardTest : public ProfileSyncService {
33 public: 33 public:
34 ProfileSyncServiceForWizardTest(ProfileSyncFactory* factory, Profile* profile) 34 ProfileSyncServiceForWizardTest(ProfileSyncFactory* factory, Profile* profile)
35 : ProfileSyncService(factory, profile, false), 35 : ProfileSyncService(factory, profile, ""),
36 user_cancelled_dialog_(false) { 36 user_cancelled_dialog_(false) {
37 RegisterPreferences(); 37 RegisterPreferences();
38 ResetTestStats(); 38 ResetTestStats();
39 } 39 }
40 40
41 virtual ~ProfileSyncServiceForWizardTest() { } 41 virtual ~ProfileSyncServiceForWizardTest() { }
42 42
43 virtual void OnUserSubmittedAuth(const std::string& username, 43 virtual void OnUserSubmittedAuth(const std::string& username,
44 const std::string& password, 44 const std::string& password,
45 const std::string& captcha) { 45 const std::string& captcha) {
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 int error = -1; 483 int error = -1;
484 dialog_args.GetInteger("error", &error); 484 dialog_args.GetInteger("error", &error);
485 EXPECT_EQ(static_cast<int>(AuthError::INVALID_GAIA_CREDENTIALS), error); 485 EXPECT_EQ(static_cast<int>(AuthError::INVALID_GAIA_CREDENTIALS), error);
486 service_->set_auth_state(kTestUser, AuthError::None()); 486 service_->set_auth_state(kTestUser, AuthError::None());
487 487
488 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); 488 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS);
489 EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled()); 489 EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled());
490 } 490 }
491 491
492 #undef SKIP_TEST_ON_MACOSX 492 #undef SKIP_TEST_ON_MACOSX
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698