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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGoogleApiAvailability.java

Issue 2698143005: [Offline pages] Ensuring obtaining GcmNetworkManager in BackgroundScheduler does not throw (Closed)
Patch Set: Fixing date in copyright header Created 3 years, 10 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
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/OfflinePageTestRunner.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGoogleApiAvailability.java
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGoogleApiAvailability.java b/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGoogleApiAvailability.java
new file mode 100644
index 0000000000000000000000000000000000000000..bb8bbb1298fb3791d220419393a2b3ccb7e2ac5e
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/ShadowGoogleApiAvailability.java
@@ -0,0 +1,22 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.offlinepages;
+
+import android.content.Context;
+
+import com.google.android.gms.common.ConnectionResult;
+import com.google.android.gms.common.GoogleApiAvailability;
+
+import org.robolectric.annotation.Implementation;
+import org.robolectric.annotation.Implements;
+
+/** Custom shadow for the OS's GoogleApiAvailability. */
+@Implements(GoogleApiAvailability.class)
+public class ShadowGoogleApiAvailability {
+ @Implementation
+ public int isGooglePlayServicesAvailable(Context context) {
+ return ConnectionResult.SUCCESS;
+ }
+}
« no previous file with comments | « chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/OfflinePageTestRunner.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698