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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTestShadowResources.java

Issue 2831223002: [Media>UI] Migrate media notification tests to JUnit tests (Closed)
Patch Set: fixed tests Created 3 years, 8 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: chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTestShadowResources.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTestShadowResources.java b/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTestShadowResources.java
index 7febe4442deccbd874b2dae92289c0d07ed762ed..5dea1cab3a977e965f15647933b351e79bc8f82b 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTestShadowResources.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/media/ui/MediaNotificationTestShadowResources.java
@@ -9,6 +9,9 @@ import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import android.content.res.Resources;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
@@ -36,4 +39,9 @@ public class MediaNotificationTestShadowResources extends ShadowResources {
public CharSequence getResourceName(int id) {
return sResources.getResourceName(id);
}
+
+ @Implementation
+ public Drawable getDrawable(int id, Resources.Theme theme) {
+ return new ColorDrawable(Color.RED);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698