michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.tests.components; michael@0: michael@0: import org.mozilla.gecko.Actions; michael@0: import org.mozilla.gecko.tests.UITestContext; michael@0: michael@0: import android.app.Activity; michael@0: michael@0: import com.jayway.android.robotium.solo.Solo; michael@0: michael@0: /** michael@0: * A base class for constructing components - an abstraction over small bits of Firefox michael@0: * functionality. For example, the Toolbar or the about:home screen could be considered a michael@0: * component. Components should not need to know about each others existences and should be michael@0: * combined via helpers. Helpers can also handle a series of actions taken on one component michael@0: * (e.g. clicking the toolbar, entering a url, and waiting for page load). michael@0: */ michael@0: public abstract class BaseComponent { michael@0: protected final UITestContext mTestContext; michael@0: protected final Activity mActivity; michael@0: protected final Solo mSolo; michael@0: protected final Actions mActions; michael@0: michael@0: public BaseComponent(final UITestContext testContext) { michael@0: mTestContext = testContext; michael@0: mActivity = mTestContext.getActivity(); michael@0: mSolo = mTestContext.getSolo(); michael@0: mActions = mTestContext.getActions(); michael@0: } michael@0: }