mobile/android/base/tests/UITestContext.java

branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
equal deleted inserted replaced
-1:000000000000 0:5411aeaa6ea4
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/. */
4
5 package org.mozilla.gecko.tests;
6
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;
11
12 import android.app.Activity;
13 import android.app.Instrumentation;
14
15 import com.jayway.android.robotium.solo.Solo;
16
17 /**
18 * Interface to the global information about a UITest environment.
19 */
20 public interface UITestContext {
21
22 public static enum ComponentType {
23 ABOUTHOME,
24 APPMENU,
25 GECKOVIEW,
26 TOOLBAR
27 }
28
29 public Activity getActivity();
30 public Solo getSolo();
31 public Assert getAsserter();
32 public Driver getDriver();
33 public Actions getActions();
34 public Instrumentation getInstrumentation();
35
36 public void dumpLog(final String logtag, final String message);
37 public void dumpLog(final String logtag, final String message, final Throwable t);
38
39 /**
40 * Returns the absolute version of the given URL using the host's hostname.
41 */
42 public String getAbsoluteHostnameUrl(final String url);
43
44 /**
45 * Returns the absolute version of the given URL using the host's IP address.
46 */
47 public String getAbsoluteIpUrl(final String url);
48
49 public BaseComponent getComponent(final ComponentType type);
50 }

mercurial