mobile/android/base/tests/UITestContext.java

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 package org.mozilla.gecko.tests;
michael@0 6
michael@0 7 import org.mozilla.gecko.Actions;
michael@0 8 import org.mozilla.gecko.Assert;
michael@0 9 import org.mozilla.gecko.Driver;
michael@0 10 import org.mozilla.gecko.tests.components.BaseComponent;
michael@0 11
michael@0 12 import android.app.Activity;
michael@0 13 import android.app.Instrumentation;
michael@0 14
michael@0 15 import com.jayway.android.robotium.solo.Solo;
michael@0 16
michael@0 17 /**
michael@0 18 * Interface to the global information about a UITest environment.
michael@0 19 */
michael@0 20 public interface UITestContext {
michael@0 21
michael@0 22 public static enum ComponentType {
michael@0 23 ABOUTHOME,
michael@0 24 APPMENU,
michael@0 25 GECKOVIEW,
michael@0 26 TOOLBAR
michael@0 27 }
michael@0 28
michael@0 29 public Activity getActivity();
michael@0 30 public Solo getSolo();
michael@0 31 public Assert getAsserter();
michael@0 32 public Driver getDriver();
michael@0 33 public Actions getActions();
michael@0 34 public Instrumentation getInstrumentation();
michael@0 35
michael@0 36 public void dumpLog(final String logtag, final String message);
michael@0 37 public void dumpLog(final String logtag, final String message, final Throwable t);
michael@0 38
michael@0 39 /**
michael@0 40 * Returns the absolute version of the given URL using the host's hostname.
michael@0 41 */
michael@0 42 public String getAbsoluteHostnameUrl(final String url);
michael@0 43
michael@0 44 /**
michael@0 45 * Returns the absolute version of the given URL using the host's IP address.
michael@0 46 */
michael@0 47 public String getAbsoluteIpUrl(final String url);
michael@0 48
michael@0 49 public BaseComponent getComponent(final ComponentType type);
michael@0 50 }

mercurial