Commit 3b78c536 authored by Olivier Robin's avatar Olivier Robin Committed by Commit Bot

Fix PersonalDataManagerTest::CreateDataForTest on Release builds

The ModelTypeSet(ModelType) constructor does not create a
ModelTypeSet containing only ModelType.
On debug builds, the variable initializations of bitset to 0 make the
test working as expected.
On release builds, the preferred data types is set to a random value.
Fix by calling an explicit ModelTypeSet constructor.

Bug: 837553
Change-Id: I55c83a16ce391fdc908f0247d2dd1c7e510d54d7
Reviewed-on: https://chromium-review.googlesource.com/1039192Reviewed-by: default avatarRoger McFarlane <rogerm@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555371}
parent 9c36c31e
......@@ -5692,14 +5692,9 @@ TEST_F(PersonalDataManagerTest, RemoveExpiredCreditCardsNotUsedSinceTimestamp) {
}
}
#if !defined(OS_IOS)
#define MAYBE_CreateDataForTest CreateDataForTest
#else
#define MAYBE_CreateDataForTest DISABLED_CreateDataForTest
#endif
TEST_F(PersonalDataManagerTest, MAYBE_CreateDataForTest) {
TEST_F(PersonalDataManagerTest, CreateDataForTest) {
// Disable sync so the data gets created.
sync_service_.SetPreferredDataTypes(syncer::ModelType::UNSPECIFIED);
sync_service_.SetPreferredDataTypes(syncer::ModelTypeSet());
// By default, the creation of test data is disabled.
ResetPersonalDataManager(USER_MODE_NORMAL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment