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

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

Issue 276072: The login dialog was being opened with the main browser window as a parent in... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 11 years, 2 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifdef CHROME_PERSONALIZATION 5 #ifdef CHROME_PERSONALIZATION
6 6
7 #include <stack> 7 #include <stack>
8 #include <vector> 8 #include <vector>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 281
282 void StartSyncService() { 282 void StartSyncService() {
283 if (!service_.get()) { 283 if (!service_.get()) {
284 service_.reset(new TestProfileSyncService(profile_.get())); 284 service_.reset(new TestProfileSyncService(profile_.get()));
285 service_->Initialize(); 285 service_->Initialize();
286 } 286 }
287 // The service may have already started sync automatically if it's already 287 // The service may have already started sync automatically if it's already
288 // enabled by user once. 288 // enabled by user once.
289 if (!service_->HasSyncSetupCompleted()) 289 if (!service_->HasSyncSetupCompleted())
290 service_->EnableForUser(); 290 service_->EnableForUser(NULL);
291 } 291 }
292 void StopSyncService(SaveOption save) { 292 void StopSyncService(SaveOption save) {
293 if (save == DONT_SAVE_TO_STORAGE) 293 if (save == DONT_SAVE_TO_STORAGE)
294 service_->DisableForUser(); 294 service_->DisableForUser();
295 service_.reset(); 295 service_.reset();
296 } 296 }
297 297
298 // Load (or re-load) the bookmark model. |load| controls use of the 298 // Load (or re-load) the bookmark model. |load| controls use of the
299 // bookmarks file on disk. |save| controls whether the newly loaded 299 // bookmarks file on disk. |save| controls whether the newly loaded
300 // bookmark model will write out a bookmark file as it goes. 300 // bookmark model will write out a bookmark file as it goes.
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 StartSyncService(); 1267 StartSyncService();
1268 1268
1269 // Make sure we're back in sync. In real life, the user would need 1269 // Make sure we're back in sync. In real life, the user would need
1270 // to reauthenticate before this happens, but in the test, authentication 1270 // to reauthenticate before this happens, but in the test, authentication
1271 // is sidestepped. 1271 // is sidestepped.
1272 ExpectBookmarkModelMatchesTestData(); 1272 ExpectBookmarkModelMatchesTestData();
1273 ExpectModelMatch(); 1273 ExpectModelMatch();
1274 } 1274 }
1275 1275
1276 #endif // CHROME_PERSONALIZATION 1276 #endif // CHROME_PERSONALIZATION
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698