Index: sync/android/javatests/src/org/chromium/sync/notifier/InvalidationControllerTest.java |
diff --git a/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationControllerTest.java b/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationControllerTest.java |
index 44f9eb40e5451085ac89760c8ac23b7ba01fe790..704be21c55e61bf03334e84006c6dbc8188aa691 100644 |
--- a/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationControllerTest.java |
+++ b/sync/android/javatests/src/org/chromium/sync/notifier/InvalidationControllerTest.java |
@@ -13,9 +13,6 @@ import android.content.pm.PackageManager; |
import android.test.InstrumentationTestCase; |
import android.test.suitebuilder.annotation.SmallTest; |
-import com.google.common.collect.Lists; |
-import com.google.common.collect.Sets; |
- |
import org.chromium.base.ActivityStatus; |
import org.chromium.base.test.util.AdvancedMockContext; |
import org.chromium.base.test.util.Feature; |
@@ -26,6 +23,7 @@ import org.chromium.sync.signin.ChromeSigninController; |
import org.chromium.sync.test.util.MockSyncContentResolverDelegate; |
import java.util.ArrayList; |
+import java.util.Arrays; |
import java.util.HashSet; |
import java.util.List; |
import java.util.Set; |
@@ -155,7 +153,7 @@ public class InvalidationControllerTest extends InstrumentationTestCase { |
InvalidationController controller = new InvalidationController(mContext); |
Account account = new Account("test@example.com", "bogus"); |
controller.setRegisteredTypes(account, false, |
- Sets.newHashSet(ModelType.BOOKMARK, ModelType.SESSION)); |
+ new HashSet<ModelType>(Arrays.asList(ModelType.BOOKMARK, ModelType.SESSION))); |
nyquist
2013/08/20 19:01:57
CollectionUtil.newHashSet here and the three place
Yaron
2013/08/20 23:41:31
Done.
|
assertEquals(1, mContext.getNumStartedIntents()); |
// Validate destination. |
@@ -169,8 +167,9 @@ public class InvalidationControllerTest extends InstrumentationTestCase { |
// Validate registered types. |
Set<String> expectedTypes = |
- Sets.newHashSet(ModelType.BOOKMARK.name(), ModelType.SESSION.name()); |
- Set<String> actualTypes = Sets.newHashSet(); |
+ new HashSet<String>(Arrays.asList(ModelType.BOOKMARK.name(), |
+ ModelType.SESSION.name())); |
+ Set<String> actualTypes = new HashSet<String>(); |
actualTypes.addAll(intent.getStringArrayListExtra(IntentProtocol.EXTRA_REGISTERED_TYPES)); |
assertEquals(expectedTypes, actualTypes); |
} |
@@ -180,7 +179,7 @@ public class InvalidationControllerTest extends InstrumentationTestCase { |
public void testRegisterForAllTypes() { |
Account account = new Account("test@example.com", "bogus"); |
mController.setRegisteredTypes(account, true, |
- Sets.newHashSet(ModelType.BOOKMARK, ModelType.SESSION)); |
+ new HashSet<ModelType>(Arrays.asList(ModelType.BOOKMARK, ModelType.SESSION))); |
assertEquals(1, mContext.getNumStartedIntents()); |
// Validate destination. |
@@ -193,8 +192,8 @@ public class InvalidationControllerTest extends InstrumentationTestCase { |
assertEquals(account, intentAccount); |
// Validate registered types. |
- Set<String> expectedTypes = Sets.newHashSet(ModelType.ALL_TYPES_TYPE); |
- Set<String> actualTypes = Sets.newHashSet(); |
+ Set<String> expectedTypes = new HashSet<String>(Arrays.asList(ModelType.ALL_TYPES_TYPE)); |
+ Set<String> actualTypes = new HashSet<String>(); |
actualTypes.addAll(intent.getStringArrayListExtra(IntentProtocol.EXTRA_REGISTERED_TYPES)); |
assertEquals(expectedTypes, actualTypes); |
} |
@@ -298,7 +297,7 @@ public class InvalidationControllerTest extends InstrumentationTestCase { |
* Mock context that saves all intents given to {@code startService}. |
*/ |
private static class IntentSavingContext extends AdvancedMockContext { |
- private final List<Intent> startedIntents = Lists.newArrayList(); |
+ private final List<Intent> startedIntents = new ArrayList<Intent>(); |
IntentSavingContext(Context targetContext) { |
super(targetContext); |