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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc

Issue 22510004: Show sync setup in same tab as sign in instead of active tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add web_contents parameter to ShowSyncSettingsPageInWebContents Created 7 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync/one_click_signin_sync_starter.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_starter.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 protected: 54 protected:
55 void CreateSyncStarter(OneClickSigninSyncStarter::Callback callback) { 55 void CreateSyncStarter(OneClickSigninSyncStarter::Callback callback) {
56 sync_starter_ = new OneClickSigninSyncStarter( 56 sync_starter_ = new OneClickSigninSyncStarter(
57 profile_.get(), 57 profile_.get(),
58 NULL, 58 NULL,
59 std::string(), 59 std::string(),
60 kTestingUsername, 60 kTestingUsername,
61 std::string(), 61 std::string(),
62 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS, 62 OneClickSigninSyncStarter::SYNC_WITH_DEFAULT_SETTINGS,
63 false, 63 NULL,
64 OneClickSigninSyncStarter::NO_CONFIRMATION, 64 OneClickSigninSyncStarter::NO_CONFIRMATION,
65 signin::SOURCE_UNKNOWN, 65 signin::SOURCE_UNKNOWN,
66 callback 66 callback
67 ); 67 );
68 } 68 }
69 69
70 scoped_ptr<TestingProfile> profile_; 70 scoped_ptr<TestingProfile> profile_;
71 71
72 // Deletes itself when SigninFailed() or SigninSuccess() is called. 72 // Deletes itself when SigninFailed() or SigninSuccess() is called.
73 OneClickSigninSyncStarter* sync_starter_; 73 OneClickSigninSyncStarter* sync_starter_;
(...skipping 24 matching lines...) Expand all
98 } 98 }
99 99
100 // Verifies that there is no crash when the callback is NULL. 100 // Verifies that there is no crash when the callback is NULL.
101 TEST_F(OneClickSigninSyncStarterTest, CallbackNull) { 101 TEST_F(OneClickSigninSyncStarterTest, CallbackNull) {
102 CreateSyncStarter(OneClickSigninSyncStarter::Callback()); 102 CreateSyncStarter(OneClickSigninSyncStarter::Callback());
103 sync_starter_->SigninFailed(GoogleServiceAuthError( 103 sync_starter_->SigninFailed(GoogleServiceAuthError(
104 GoogleServiceAuthError::REQUEST_CANCELED)); 104 GoogleServiceAuthError::REQUEST_CANCELED));
105 EXPECT_EQ(0, failed_count_); 105 EXPECT_EQ(0, failed_count_);
106 EXPECT_EQ(0, succeeded_count_); 106 EXPECT_EQ(0, succeeded_count_);
107 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_starter.cc ('k') | chrome/browser/ui/webui/inline_login_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698