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

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

Issue 777143003: Clean up straggler classes to use embedded signin in page in the new profiles world. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_observer.h" 5 #include "chrome/browser/ui/sync/one_click_signin_sync_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); 225 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
226 226
227 // Trigger an event to force state to be cleaned up. 227 // Trigger an event to force state to be cleaned up.
228 SetContents(NULL); 228 SetContents(NULL);
229 } 229 }
230 230
231 // Verify that if the continue_url is to the settings page, no navigation is 231 // Verify that if the continue_url is to the settings page, no navigation is
232 // triggered, since it would be redundant. 232 // triggered, since it would be redundant.
233 TEST_F(OneClickSigninSyncObserverTest, 233 TEST_F(OneClickSigninSyncObserverTest,
234 OnSyncStateChanged_SyncConfiguredSuccessfully_SourceIsSettings) { 234 OnSyncStateChanged_SyncConfiguredSuccessfully_SourceIsSettings) {
235 GURL continue_url = signin::GetPromoURL(signin::SOURCE_SETTINGS, false); 235 GURL continue_url = signin::GetPromoURL(
236 signin_metrics::SOURCE_SETTINGS, false);
236 CreateSyncObserver(continue_url.spec()); 237 CreateSyncObserver(continue_url.spec());
237 sync_service_->set_first_setup_in_progress(false); 238 sync_service_->set_first_setup_in_progress(false);
238 sync_service_->set_sync_active(true); 239 sync_service_->set_sync_active(true);
239 240
240 EXPECT_CALL(*web_contents_observer_, AboutToNavigateRenderFrame(_)).Times(0); 241 EXPECT_CALL(*web_contents_observer_, AboutToNavigateRenderFrame(_)).Times(0);
241 sync_service_->NotifyObservers(); 242 sync_service_->NotifyObservers();
242 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); 243 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
243 } 244 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_observer.cc ('k') | chrome/browser/ui/sync/signin_histogram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698