Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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.components;
7 import org.mozilla.gecko.Actions;
8 import org.mozilla.gecko.tests.UITestContext;
10 import android.app.Activity;
12 import com.jayway.android.robotium.solo.Solo;
14 /**
15 * A base class for constructing components - an abstraction over small bits of Firefox
16 * functionality. For example, the Toolbar or the about:home screen could be considered a
17 * component. Components should not need to know about each others existences and should be
18 * combined via helpers. Helpers can also handle a series of actions taken on one component
19 * (e.g. clicking the toolbar, entering a url, and waiting for page load).
20 */
21 public abstract class BaseComponent {
22 protected final UITestContext mTestContext;
23 protected final Activity mActivity;
24 protected final Solo mSolo;
25 protected final Actions mActions;
27 public BaseComponent(final UITestContext testContext) {
28 mTestContext = testContext;
29 mActivity = mTestContext.getActivity();
30 mSolo = mTestContext.getSolo();
31 mActions = mTestContext.getActions();
32 }
33 }