OLD | NEW |
| (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.junit.runners.model.InitializationError; | |
8 import org.robolectric.internal.bytecode.InstrumentationConfiguration; | |
9 | |
10 import org.chromium.testing.local.LocalRobolectricTestRunner; | |
11 | |
12 /** | |
13 * Custom Robolectric test runner that instruments the com.google.android.gms.gc
m package | |
14 * so Shadows of those classes can be created. | |
15 */ | |
16 public class OfflinePageTestRunner extends LocalRobolectricTestRunner { | |
17 | |
18 /** | |
19 * OfflinePageTestRunner constructor | |
20 */ | |
21 public OfflinePageTestRunner(Class<?> testClass) throws InitializationError
{ | |
22 super(testClass); | |
23 } | |
24 | |
25 @Override | |
26 public InstrumentationConfiguration createClassLoaderConfig() { | |
27 InstrumentationConfiguration.Builder builder = InstrumentationConfigurat
ion.newBuilder(); | |
28 builder.addInstrumentedPackage("com.google.android.gms.common"); | |
29 builder.addInstrumentedPackage("com.google.android.gms.gcm"); | |
30 return builder.build(); | |
31 } | |
32 } | |
OLD | NEW |