Index: components/invalidation/impl/android/javatests/src/org/chromium/components/invalidation/InvalidationClientServiceTest.java |
diff --git a/components/invalidation/impl/android/javatests/src/org/chromium/components/invalidation/InvalidationClientServiceTest.java b/components/invalidation/impl/android/javatests/src/org/chromium/components/invalidation/InvalidationClientServiceTest.java |
index 95413122f37248625e4726be8e5a142350405054..be92b46d2b49405af7d37bf5e4bf1e0fa66c77a1 100644 |
--- a/components/invalidation/impl/android/javatests/src/org/chromium/components/invalidation/InvalidationClientServiceTest.java |
+++ b/components/invalidation/impl/android/javatests/src/org/chromium/components/invalidation/InvalidationClientServiceTest.java |
@@ -6,6 +6,7 @@ package org.chromium.components.invalidation; |
import android.accounts.Account; |
import android.content.ComponentName; |
+import android.content.Context; |
import android.content.Intent; |
import android.test.ServiceTestCase; |
import android.test.suitebuilder.annotation.SmallTest; |
@@ -65,8 +66,9 @@ public class InvalidationClientServiceTest extends |
return new ComponentName(this, InvalidationClientServiceTest.class); |
} |
}); |
- ContextUtils.initApplicationContextForTests(getContext().getApplicationContext()); |
- PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX); |
+ Context appContext = getContext().getApplicationContext(); |
+ ContextUtils.initApplicationContextForTests(appContext); |
+ PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, appContext); |
LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized(); |
setupService(); |
} |