1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/build/mobile/robocop/FennecInstrumentationTestRunner.java Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +package org.mozilla.gecko; 1.9 + 1.10 +import android.os.Bundle; 1.11 +import android.test.InstrumentationTestRunner; 1.12 +import android.util.Log; 1.13 + 1.14 +public class FennecInstrumentationTestRunner extends InstrumentationTestRunner { 1.15 + private static Bundle sArguments; 1.16 + 1.17 + @Override 1.18 + public void onCreate(Bundle arguments) { 1.19 + sArguments = arguments; 1.20 + if (sArguments == null) { 1.21 + Log.e("Robocop", "FennecInstrumentationTestRunner.onCreate got null bundle"); 1.22 + } 1.23 + super.onCreate(arguments); 1.24 + } 1.25 + 1.26 + // unfortunately we have to make this static because test classes that don't extend 1.27 + // from ActivityInstrumentationTestCase2 can't get a reference to this class. 1.28 + public static Bundle getFennecArguments() { 1.29 + if (sArguments == null) { 1.30 + Log.e("Robocop", "FennecInstrumentationTestCase.getFennecArguments returns null bundle"); 1.31 + } 1.32 + return sArguments; 1.33 + } 1.34 +}