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

Side by Side Diff: chrome/android/junit/src/org/chromium/chrome/browser/offlinepages/OfflinePageTestRunner.java

Issue 2195143002: [Android] Update all Robolectric tests to Robolectric 3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OfflinePageTestRunner.java to CL 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.chrome.browser.offlinepages;
6
7 import org.chromium.testing.local.LocalRobolectricTestRunner;
8 import org.junit.runners.model.InitializationError;
9 import org.robolectric.internal.bytecode.InstrumentationConfiguration;
10
11 /**
12 * Custom Robolectric test runner that instruments the com.google.android.gms.gc m package
13 * so Shadows of those classes can be created.
14 */
15 public class OfflinePageTestRunner extends LocalRobolectricTestRunner {
16
17 /**
18 * OfflinePageTestRunner constructor
19 */
20 public OfflinePageTestRunner(Class<?> testClass) throws InitializationError {
21 super(testClass);
22 }
23
24 @Override
25 public InstrumentationConfiguration createClassLoaderConfig() {
26 InstrumentationConfiguration.Builder builder = InstrumentationConfigurat ion.newBuilder();
27 builder.addInstrumentedPackage("com.google.android.gms.gcm");
28 return builder.build();
29 }
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698