michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: package org.mozilla.gecko.browser.harness; michael@0: michael@0: import android.os.Bundle; michael@0: import android.test.AndroidTestRunner; michael@0: import android.test.InstrumentationTestRunner; michael@0: import android.util.Log; michael@0: michael@0: /** michael@0: * A test runner that installs a special test listener. michael@0: *

michael@0: * In future, this listener will turn JUnit 3 test events into log messages in michael@0: * the format that Mochitest parsers understand. michael@0: */ michael@0: public class BrowserInstrumentationTestRunner extends InstrumentationTestRunner { michael@0: private static final String LOG_TAG = "BInstTestRunner"; michael@0: michael@0: @Override michael@0: public void onCreate(Bundle arguments) { michael@0: Log.d(LOG_TAG, "onCreate"); michael@0: super.onCreate(arguments); michael@0: } michael@0: michael@0: @Override michael@0: protected AndroidTestRunner getAndroidTestRunner() { michael@0: Log.d(LOG_TAG, "getAndroidTestRunner"); michael@0: AndroidTestRunner testRunner = super.getAndroidTestRunner(); michael@0: testRunner.addTestListener(new BrowserTestListener()); michael@0: return testRunner; michael@0: } michael@0: }