2012-09-12 04:56:31 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2013-11-07 08:18:51 -08:00
|
|
|
package org.mozilla.gecko;
|
2012-09-12 04:56:31 -07:00
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.test.InstrumentationTestRunner;
|
2013-02-11 11:01:58 -08:00
|
|
|
import android.util.Log;
|
2012-09-12 04:56:31 -07:00
|
|
|
|
|
|
|
public class FennecInstrumentationTestRunner extends InstrumentationTestRunner {
|
|
|
|
private static Bundle sArguments;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onCreate(Bundle arguments) {
|
|
|
|
sArguments = arguments;
|
2013-02-11 11:01:58 -08:00
|
|
|
if (sArguments == null) {
|
|
|
|
Log.e("Robocop", "FennecInstrumentationTestRunner.onCreate got null bundle");
|
|
|
|
}
|
|
|
|
super.onCreate(arguments);
|
2012-09-12 04:56:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// unfortunately we have to make this static because test classes that don't extend
|
|
|
|
// from ActivityInstrumentationTestCase2 can't get a reference to this class.
|
2013-07-30 08:13:34 -07:00
|
|
|
public static Bundle getFennecArguments() {
|
2013-02-11 11:01:58 -08:00
|
|
|
if (sArguments == null) {
|
2013-07-30 08:13:34 -07:00
|
|
|
Log.e("Robocop", "FennecInstrumentationTestCase.getFennecArguments returns null bundle");
|
2013-02-11 11:01:58 -08:00
|
|
|
}
|
2012-09-12 04:56:31 -07:00
|
|
|
return sArguments;
|
|
|
|
}
|
|
|
|
}
|