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

Side by Side Diff: chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/thread_task_runner_handle.h" 7 #include "base/thread_task_runner_handle.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/apps/app_browsertest_util.h" 9 #include "chrome/browser/apps/app_browsertest_util.h"
10 #include "chrome/browser/drive/fake_drive_service.h" 10 #include "chrome/browser/drive/fake_drive_service.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 drive_backend::SyncEngine* sync_engine() { 128 drive_backend::SyncEngine* sync_engine() {
129 return static_cast<drive_backend::SyncEngine*>( 129 return static_cast<drive_backend::SyncEngine*>(
130 sync_file_system_service()->remote_service_.get()); 130 sync_file_system_service()->remote_service_.get());
131 } 131 }
132 132
133 LocalFileSyncService* local_file_sync_service() { 133 LocalFileSyncService* local_file_sync_service() {
134 return sync_file_system_service()->local_service_.get(); 134 return sync_file_system_service()->local_service_.get();
135 } 135 }
136 136
137 void SignIn() { 137 void SignIn() {
138 fake_signin_manager_->SetAuthenticatedUsername("tester"); 138 fake_signin_manager_->SetAuthenticatedAccountInfo("12345", "tester");
139 sync_engine()->GoogleSigninSucceeded("test_account", "tester", "testing"); 139 sync_engine()->GoogleSigninSucceeded("12345", "tester", "password");
140 } 140 }
141 141
142 void SetSyncEnabled(bool enabled) { 142 void SetSyncEnabled(bool enabled) {
143 sync_file_system_service()->SetSyncEnabledForTesting(enabled); 143 sync_file_system_service()->SetSyncEnabledForTesting(enabled);
144 } 144 }
145 145
146 void WaitUntilIdle() { 146 void WaitUntilIdle() {
147 base::RunLoop run_loop; 147 base::RunLoop run_loop;
148 sync_file_system_service()->CallOnIdleForTesting(run_loop.QuitClosure()); 148 sync_file_system_service()->CallOnIdleForTesting(run_loop.QuitClosure());
149 run_loop.Run(); 149 run_loop.Run();
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 sync_engine()->GoogleSigninSucceeded("test_account", "tester", "testing"); 207 sync_engine()->GoogleSigninSucceeded("test_account", "tester", "testing");
208 WaitUntilIdle(); 208 WaitUntilIdle();
209 209
210 bar_created.Reply("resume"); 210 bar_created.Reply("resume");
211 211
212 EXPECT_TRUE(catcher.GetNextResult()); 212 EXPECT_TRUE(catcher.GetNextResult());
213 } 213 }
214 214
215 } // namespace sync_file_system 215 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698