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

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

Issue 1806353002: Enhanced Sync Confirmation modal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 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 <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 }; 87 };
88 88
89 class TestOneClickSigninSyncObserver : public OneClickSigninSyncObserver { 89 class TestOneClickSigninSyncObserver : public OneClickSigninSyncObserver {
90 public: 90 public:
91 typedef base::Callback<void(TestOneClickSigninSyncObserver*)> 91 typedef base::Callback<void(TestOneClickSigninSyncObserver*)>
92 DestructionCallback; 92 DestructionCallback;
93 93
94 TestOneClickSigninSyncObserver(content::WebContents* web_contents, 94 TestOneClickSigninSyncObserver(content::WebContents* web_contents,
95 const GURL& continue_url, 95 const GURL& continue_url,
96 const DestructionCallback& callback) 96 const DestructionCallback& callback)
97 : OneClickSigninSyncObserver(web_contents, continue_url), 97 : OneClickSigninSyncObserver(web_contents, nullptr, nullptr,
98 GURL::EmptyGURL(), continue_url),
98 destruction_callback_(callback) {} 99 destruction_callback_(callback) {}
99 ~TestOneClickSigninSyncObserver() override { 100 ~TestOneClickSigninSyncObserver() override {
100 destruction_callback_.Run(this); 101 destruction_callback_.Run(this);
101 } 102 }
102 103
103 private: 104 private:
104 DestructionCallback destruction_callback_; 105 DestructionCallback destruction_callback_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(TestOneClickSigninSyncObserver); 107 DISALLOW_COPY_AND_ASSIGN(TestOneClickSigninSyncObserver);
107 }; 108 };
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false); 248 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT, false);
248 CreateSyncObserver(continue_url.spec()); 249 CreateSyncObserver(continue_url.spec());
249 sync_service_->set_first_setup_in_progress(false); 250 sync_service_->set_first_setup_in_progress(false);
250 sync_service_->set_sync_active(true); 251 sync_service_->set_sync_active(true);
251 252
252 EXPECT_CALL(*web_contents_observer_, 253 EXPECT_CALL(*web_contents_observer_,
253 DidStartNavigationToPendingEntry(_, _)).Times(0); 254 DidStartNavigationToPendingEntry(_, _)).Times(0);
254 sync_service_->NotifyObservers(); 255 sync_service_->NotifyObservers();
255 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL()); 256 EXPECT_NE(GURL(kContinueUrl), web_contents()->GetVisibleURL());
256 } 257 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_sync_observer.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_starter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698