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

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

mercurial