Chromium Code Reviews| Index: sync/internal_api/sync_manager_impl_unittest.cc |
| diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc |
| index b7966797484ac6d58519aed5fb4c3a91cd6957a5..7f0d8c7d9e03d509b41a199b8532bcf229bdb175 100644 |
| --- a/sync/internal_api/sync_manager_impl_unittest.cc |
| +++ b/sync/internal_api/sync_manager_impl_unittest.cc |
| @@ -2804,13 +2804,7 @@ class SyncManagerTestWithMockScheduler : public SyncManagerTest { |
| // Test that the configuration params are properly created and sent to |
| // ScheduleConfigure. No callback should be invoked. Any disabled datatypes |
| // should be purged. |
| -// Fails on Windows: crbug.com/139726 |
| -#if defined(OS_WIN) |
| -#define MAYBE_BasicConfiguration DISABLED_BasicConfiguration |
| -#else |
| -#define MAYBE_BasicConfiguration BasicConfiguration |
| -#endif |
| -TEST_F(SyncManagerTestWithMockScheduler, MAYBE_BasicConfiguration) { |
| +TEST_F(SyncManagerTestWithMockScheduler, BasicConfiguration) { |
| ConfigureReason reason = CONFIGURE_REASON_RECONFIGURATION; |
| ModelTypeSet types_to_download(BOOKMARKS, PREFERENCES); |
| ModelSafeRoutingInfo new_routing_info; |
| @@ -2824,7 +2818,9 @@ TEST_F(SyncManagerTestWithMockScheduler, MAYBE_BasicConfiguration) { |
| WillOnce(DoAll(SaveArg<0>(¶ms), Return(true))); |
| // Set data for all types. |
| - for (ModelTypeSet::Iterator iter = ModelTypeSet::All().First(); iter.Good(); |
| + ModelTypeSet real_types = ModelTypeSet::All(); |
| + real_types.RemoveAll(VirtualTypes()); |
| + for (ModelTypeSet::Iterator iter = real_types.First(); iter.Good(); |
| iter.Inc()) { |
| SetProgressMarkerForType(iter.Get(), true); |
| } |
| @@ -2876,6 +2872,8 @@ TEST_F(SyncManagerTestWithMockScheduler, ReConfiguration) { |
| // only those recently disabled are purged) . |
| for (ModelTypeSet::Iterator iter = ModelTypeSet::All().First(); iter.Good(); |
|
tim (not reviewing)
2013/02/05 02:41:58
Random thought, another option to this and to crea
Nicolas Zea
2013/02/07 01:18:48
I went ahea and added a ProtocolTypes() method in
|
| iter.Inc()) { |
| + if (VirtualTypes().Has(iter.Get())) |
| + continue; |
| if (!disabled_types.Has(iter.Get())) { |
| SetProgressMarkerForType(iter.Get(), true); |
| } else { |
| @@ -2905,7 +2903,7 @@ TEST_F(SyncManagerTestWithMockScheduler, ReConfiguration) { |
| // Verify only the recently disabled types were purged. |
| EXPECT_TRUE(sync_manager_.GetTypesWithEmptyProgressMarkerToken( |
| - ModelTypeSet::All()).Equals(disabled_types)); |
| + Difference(ModelTypeSet::All(), VirtualTypes())).Equals(disabled_types)); |
| } |
| // Test that the retry callback is invoked on configuration failure. |
| @@ -3013,13 +3011,7 @@ TEST_F(SyncManagerTest, PurgePartiallySyncedTypes) { |
| // Test CleanupDisabledTypes properly purges all disabled types as specified |
| // by the previous and current enabled params. |
| -// Fails on Windows: crbug.com/139726 |
| -#if defined(OS_WIN) |
| -#define MAYBE_PurgeDisabledTypes DISABLED_PurgeDisabledTypes |
| -#else |
| -#define MAYBE_PurgeDisabledTypes PurgeDisabledTypes |
| -#endif |
| -TEST_F(SyncManagerTest, MAYBE_PurgeDisabledTypes) { |
| +TEST_F(SyncManagerTest, PurgeDisabledTypes) { |
| ModelSafeRoutingInfo routing_info; |
| GetModelSafeRoutingInfo(&routing_info); |
| ModelTypeSet enabled_types = GetRoutingInfoTypes(routing_info); |
| @@ -3029,7 +3021,9 @@ TEST_F(SyncManagerTest, MAYBE_PurgeDisabledTypes) { |
| EXPECT_TRUE(enabled_types.Equals(sync_manager_.InitialSyncEndedTypes())); |
| // Set progress markers for all types. |
| - for (ModelTypeSet::Iterator iter = ModelTypeSet::All().First(); iter.Good(); |
| + ModelTypeSet real_types = ModelTypeSet::All(); |
| + real_types.RemoveAll(VirtualTypes()); |
| + for (ModelTypeSet::Iterator iter = real_types.First(); iter.Good(); |
| iter.Inc()) { |
| SetProgressMarkerForType(iter.Get(), true); |
| } |