mobile/android/base/tests/components/BaseComponent.java

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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 }

mercurial