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.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 } |
OLD | NEW |