OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
7 #include "base/prefs/scoped_user_pref_update.h" | 7 #include "base/prefs/scoped_user_pref_update.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/sync/profile_sync_service.h" | 9 #include "chrome/browser/sync/profile_sync_service.h" |
10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" | 10 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 DCHECK(GetSyncService((0))); | 93 DCHECK(GetSyncService((0))); |
94 syncer::ModelTypeSet preferred_data_types = | 94 syncer::ModelTypeSet preferred_data_types = |
95 GetSyncService((0))->GetPreferredDataTypes(); | 95 GetSyncService((0))->GetPreferredDataTypes(); |
96 preferred_data_types.RemoveAll(syncer::ProxyTypes()); | 96 preferred_data_types.RemoveAll(syncer::ProxyTypes()); |
97 | 97 |
98 // Supervised user data types will be "unready" during this test, so we | 98 // Supervised user data types will be "unready" during this test, so we |
99 // should not request that they be migrated. | 99 // should not request that they be migrated. |
100 preferred_data_types.Remove(syncer::SUPERVISED_USER_SETTINGS); | 100 preferred_data_types.Remove(syncer::SUPERVISED_USER_SETTINGS); |
101 preferred_data_types.Remove(syncer::SUPERVISED_USER_WHITELISTS); | 101 preferred_data_types.Remove(syncer::SUPERVISED_USER_WHITELISTS); |
102 | 102 |
| 103 // Autofill wallet will be unready during this test, so we should not |
| 104 // request that it be migrated. |
| 105 preferred_data_types.Remove(syncer::AUTOFILL_WALLET_DATA); |
| 106 |
103 // Make sure all clients have the same preferred data types. | 107 // Make sure all clients have the same preferred data types. |
104 for (int i = 1; i < num_clients(); ++i) { | 108 for (int i = 1; i < num_clients(); ++i) { |
105 const syncer::ModelTypeSet other_preferred_data_types = | 109 const syncer::ModelTypeSet other_preferred_data_types = |
106 GetSyncService((i))->GetPreferredDataTypes(); | 110 GetSyncService((i))->GetPreferredDataTypes(); |
107 EXPECT_TRUE(preferred_data_types.Equals(other_preferred_data_types)); | 111 EXPECT_TRUE(preferred_data_types.Equals(other_preferred_data_types)); |
108 } | 112 } |
109 return preferred_data_types; | 113 return preferred_data_types; |
110 } | 114 } |
111 | 115 |
112 // Returns a MigrationList with every enabled data type in its own | 116 // Returns a MigrationList with every enabled data type in its own |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 #else | 293 #else |
290 #define MAYBE_AllTypesIndividually AllTypesIndividually | 294 #define MAYBE_AllTypesIndividually AllTypesIndividually |
291 #endif | 295 #endif |
292 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, MAYBE_AllTypesIndividually) { | 296 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, MAYBE_AllTypesIndividually) { |
293 ASSERT_TRUE(SetupClients()); | 297 ASSERT_TRUE(SetupClients()); |
294 RunSingleClientMigrationTest(GetPreferredDataTypesList(), MODIFY_BOOKMARK); | 298 RunSingleClientMigrationTest(GetPreferredDataTypesList(), MODIFY_BOOKMARK); |
295 } | 299 } |
296 | 300 |
297 #if defined(OS_WIN) || defined(OS_MACOSX) | 301 #if defined(OS_WIN) || defined(OS_MACOSX) |
298 // http://crbug.com/403778 | 302 // http://crbug.com/403778 |
299 #define MAYBE_AllTypesIndividuallyTriggerNotification DISABLED_AllTypesIndividua
llyTriggerNotification | 303 #define MAYBE_AllTypesIndividuallyTriggerNotification \ |
| 304 DISABLED_AllTypesIndividuallyTriggerNotification |
300 #else | 305 #else |
301 #define MAYBE_AllTypesIndividuallyTriggerNotification AllTypesIndividuallyTrigge
rNotification | 306 #define MAYBE_AllTypesIndividuallyTriggerNotification \ |
| 307 AllTypesIndividuallyTriggerNotification |
302 #endif | 308 #endif |
303 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, | 309 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, |
304 MAYBE_AllTypesIndividuallyTriggerNotification) { | 310 MAYBE_AllTypesIndividuallyTriggerNotification) { |
305 ASSERT_TRUE(SetupClients()); | 311 ASSERT_TRUE(SetupClients()); |
306 RunSingleClientMigrationTest(GetPreferredDataTypesList(), | 312 RunSingleClientMigrationTest(GetPreferredDataTypesList(), |
307 TRIGGER_NOTIFICATION); | 313 TRIGGER_NOTIFICATION); |
308 } | 314 } |
309 | 315 |
310 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, AllTypesAtOnce) { | 316 IN_PROC_BROWSER_TEST_F(MigrationSingleClientTest, AllTypesAtOnce) { |
311 ASSERT_TRUE(SetupClients()); | 317 ASSERT_TRUE(SetupClients()); |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 // Do not add optional datatypes. | 432 // Do not add optional datatypes. |
427 } | 433 } |
428 | 434 |
429 ~MigrationReconfigureTest() override {} | 435 ~MigrationReconfigureTest() override {} |
430 | 436 |
431 private: | 437 private: |
432 DISALLOW_COPY_AND_ASSIGN(MigrationReconfigureTest); | 438 DISALLOW_COPY_AND_ASSIGN(MigrationReconfigureTest); |
433 }; | 439 }; |
434 | 440 |
435 } // namespace | 441 } // namespace |
OLD | NEW |