Index: sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java |
diff --git a/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java b/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java |
index 4586513ca63beb2718ed3d05c79a26b60c946517..2c5e84168661e04ac73f2b03549162c7be5d658e 100644 |
--- a/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java |
+++ b/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationPreferencesTest.java |
@@ -9,14 +9,13 @@ import android.content.Context; |
import android.test.InstrumentationTestCase; |
import android.test.suitebuilder.annotation.SmallTest; |
-import com.google.common.collect.Sets; |
- |
+import org.chromium.base.CollectionUtil; |
import org.chromium.base.test.util.AdvancedMockContext; |
import org.chromium.base.test.util.Feature; |
import org.chromium.sync.internal_api.pub.base.ModelType; |
-import org.chromium.sync.notifier.InvalidationPreferences; |
import java.util.Arrays; |
+import java.util.EnumSet; |
import java.util.HashSet; |
import java.util.Set; |
@@ -41,9 +40,10 @@ public class InvalidationPreferencesTest extends InstrumentationTestCase { |
* Test plan: convert three strings to model types, one of which is invalid. Verify that |
* the two valid strings are properly converted and that the invalid string is dropped. |
*/ |
- HashSet<ModelType> expectedTypes = Sets.newHashSet(ModelType.BOOKMARK, ModelType.SESSION); |
+ HashSet<ModelType> expectedTypes = CollectionUtil.newHashSet( |
+ ModelType.BOOKMARK,ModelType.SESSION); |
Set<ModelType> actualTypes = ModelType.syncTypesToModelTypes( |
- Sets.newHashSet("BOOKMARK", "SESSION", "0!!!INVALID")); |
+ CollectionUtil.newHashSet("BOOKMARK", "SESSION", "0!!!INVALID")); |
assertEquals(expectedTypes, actualTypes); |
} |
@@ -54,9 +54,9 @@ public class InvalidationPreferencesTest extends InstrumentationTestCase { |
* Test plan: convert the special all-types type to model types. Verify that it is |
* properly expanded. |
*/ |
- HashSet<ModelType> expectedTypes = Sets.newHashSet(ModelType.values()); |
+ Set<ModelType> expectedTypes = EnumSet.allOf(ModelType.class); |
Set<ModelType> actualTypes = ModelType.syncTypesToModelTypes( |
- Sets.newHashSet(ModelType.ALL_TYPES_TYPE)); |
+ CollectionUtil.newHashSet(ModelType.ALL_TYPES_TYPE)); |
assertEquals(expectedTypes, actualTypes); |
} |
@@ -84,7 +84,7 @@ public class InvalidationPreferencesTest extends InstrumentationTestCase { |
// We should never write both a real type and the all-types type in practice, but we test |
// with them here to ensure that preferences are not interpreting the written data. |
- Set<String> syncTypes = Sets.newHashSet("BOOKMARK", ModelType.ALL_TYPES_TYPE); |
+ Set<String> syncTypes = CollectionUtil.newHashSet("BOOKMARK", ModelType.ALL_TYPES_TYPE); |
Account account = new Account("test@example.com", "bogus"); |
byte[] internalClientState = new byte[]{100,101,102}; |
invPreferences.setSyncTypes(editContext, syncTypes); |
@@ -102,4 +102,4 @@ public class InvalidationPreferencesTest extends InstrumentationTestCase { |
assertTrue(Arrays.equals( |
internalClientState, invPreferences.getInternalNotificationClientState())); |
} |
-} |
+} |