michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.tests; michael@0: michael@0: import org.mozilla.gecko.Actions; michael@0: import org.mozilla.gecko.Assert; michael@0: import org.mozilla.gecko.Driver; michael@0: import org.mozilla.gecko.tests.components.BaseComponent; michael@0: michael@0: import android.app.Activity; michael@0: import android.app.Instrumentation; michael@0: michael@0: import com.jayway.android.robotium.solo.Solo; michael@0: michael@0: /** michael@0: * Interface to the global information about a UITest environment. michael@0: */ michael@0: public interface UITestContext { michael@0: michael@0: public static enum ComponentType { michael@0: ABOUTHOME, michael@0: APPMENU, michael@0: GECKOVIEW, michael@0: TOOLBAR michael@0: } michael@0: michael@0: public Activity getActivity(); michael@0: public Solo getSolo(); michael@0: public Assert getAsserter(); michael@0: public Driver getDriver(); michael@0: public Actions getActions(); michael@0: public Instrumentation getInstrumentation(); michael@0: michael@0: public void dumpLog(final String logtag, final String message); michael@0: public void dumpLog(final String logtag, final String message, final Throwable t); michael@0: michael@0: /** michael@0: * Returns the absolute version of the given URL using the host's hostname. michael@0: */ michael@0: public String getAbsoluteHostnameUrl(final String url); michael@0: michael@0: /** michael@0: * Returns the absolute version of the given URL using the host's IP address. michael@0: */ michael@0: public String getAbsoluteIpUrl(final String url); michael@0: michael@0: public BaseComponent getComponent(final ComponentType type); michael@0: }