Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java

Issue 2243353002: (Reland) Update all Robolectric tests to Robolectric 3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java
diff --git a/components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java b/components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java
index 0fd87569731eab5190e675aaf3e52693609640b8..1194e08978318e1d6ca6833e9dfbeedd70037064 100644
--- a/components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java
+++ b/components/web_restrictions/browser/junit/src/org/chromium/components/webrestrictions/WebRestrictionsClientTest.java
@@ -25,7 +25,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mockito;
-import org.robolectric.Robolectric;
+import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.robolectric.shadows.ShadowContentResolver;
@@ -41,7 +41,7 @@ public class WebRestrictionsClientTest {
@Before
public void setUp() {
- ContextUtils.initApplicationContextForTests(Robolectric.application);
+ ContextUtils.initApplicationContextForTests(RuntimeEnvironment.application);
mTestClient = Mockito.spy(new WebRestrictionsClient());
Mockito.doNothing().when(mTestClient).nativeNotifyWebRestrictionsChanged(anyLong());
mProvider = Mockito.mock(ContentProvider.class);
@@ -116,7 +116,7 @@ public class WebRestrictionsClientTest {
public void testNotifyChange() {
ShadowContentResolver.registerProvider(TEST_CONTENT_PROVIDER, mProvider);
- ContentResolver resolver = Robolectric.application.getContentResolver();
+ ContentResolver resolver = RuntimeEnvironment.application.getContentResolver();
resolver.notifyChange(Uri.parse("content://" + TEST_CONTENT_PROVIDER), null);
verify(mTestClient).nativeNotifyWebRestrictionsChanged(1234L);
}

Powered by Google App Engine
This is Rietveld 408576698