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

Side by Side Diff: chrome/browser/sync/test/integration/migration_errors_test.cc

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // TODO(akalin): Rename this file to migration_test.cc. 5 // TODO(akalin): Rename this file to migration_test.cc.
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "chrome/browser/prefs/scoped_user_pref_update.h" 8 #include "chrome/browser/prefs/scoped_user_pref_update.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/profile_sync_service_harness.h" 10 #include "chrome/browser/sync/profile_sync_service_harness.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class MigrationTest : public SyncTest { 67 class MigrationTest : public SyncTest {
68 public: 68 public:
69 explicit MigrationTest(TestType test_type) : SyncTest(test_type) {} 69 explicit MigrationTest(TestType test_type) : SyncTest(test_type) {}
70 virtual ~MigrationTest() {} 70 virtual ~MigrationTest() {}
71 71
72 // TODO(akalin): Add more MODIFY_(data type) trigger methods, as 72 // TODO(akalin): Add more MODIFY_(data type) trigger methods, as
73 // well as a poll-based trigger method. 73 // well as a poll-based trigger method.
74 enum TriggerMethod { MODIFY_PREF, MODIFY_BOOKMARK, TRIGGER_NOTIFICATION }; 74 enum TriggerMethod { MODIFY_PREF, MODIFY_BOOKMARK, TRIGGER_NOTIFICATION };
75 75
76 syncer::ModelTypeSet GetPreferredDataTypes() { 76 syncer::ModelTypeSet GetPreferredDataTypes() {
77 // ProfileSyncService must already have been created before we can call
78 // GetPreferredDataTypes().
79 DCHECK(GetClient(0)->IsSyncAlreadySetup());
77 const syncer::ModelTypeSet preferred_data_types = 80 const syncer::ModelTypeSet preferred_data_types =
78 GetClient(0)->service()->GetPreferredDataTypes(); 81 GetClient(0)->service()->GetPreferredDataTypes();
79 // Make sure all clients have the same preferred data types. 82 // Make sure all clients have the same preferred data types.
80 for (int i = 1; i < num_clients(); ++i) { 83 for (int i = 1; i < num_clients(); ++i) {
81 const syncer::ModelTypeSet other_preferred_data_types = 84 const syncer::ModelTypeSet other_preferred_data_types =
82 GetClient(i)->service()->GetPreferredDataTypes(); 85 GetClient(i)->service()->GetPreferredDataTypes();
83 EXPECT_TRUE(preferred_data_types.Equals(other_preferred_data_types)); 86 EXPECT_TRUE(preferred_data_types.Equals(other_preferred_data_types));
84 } 87 }
85 return preferred_data_types; 88 return preferred_data_types;
86 } 89 }
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // Do not add optional datatypes. 403 // Do not add optional datatypes.
401 } 404 }
402 405
403 virtual ~MigrationReconfigureTest() {} 406 virtual ~MigrationReconfigureTest() {}
404 407
405 private: 408 private:
406 DISALLOW_COPY_AND_ASSIGN(MigrationReconfigureTest); 409 DISALLOW_COPY_AND_ASSIGN(MigrationReconfigureTest);
407 }; 410 };
408 411
409 } // namespace 412 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_ui_util_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698