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.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | package org.mozilla.gecko.tests.components; |
michael@0 | 6 | |
michael@0 | 7 | import org.mozilla.gecko.Actions; |
michael@0 | 8 | import org.mozilla.gecko.tests.UITestContext; |
michael@0 | 9 | |
michael@0 | 10 | import android.app.Activity; |
michael@0 | 11 | |
michael@0 | 12 | import com.jayway.android.robotium.solo.Solo; |
michael@0 | 13 | |
michael@0 | 14 | /** |
michael@0 | 15 | * A base class for constructing components - an abstraction over small bits of Firefox |
michael@0 | 16 | * functionality. For example, the Toolbar or the about:home screen could be considered a |
michael@0 | 17 | * component. Components should not need to know about each others existences and should be |
michael@0 | 18 | * combined via helpers. Helpers can also handle a series of actions taken on one component |
michael@0 | 19 | * (e.g. clicking the toolbar, entering a url, and waiting for page load). |
michael@0 | 20 | */ |
michael@0 | 21 | public abstract class BaseComponent { |
michael@0 | 22 | protected final UITestContext mTestContext; |
michael@0 | 23 | protected final Activity mActivity; |
michael@0 | 24 | protected final Solo mSolo; |
michael@0 | 25 | protected final Actions mActions; |
michael@0 | 26 | |
michael@0 | 27 | public BaseComponent(final UITestContext testContext) { |
michael@0 | 28 | mTestContext = testContext; |
michael@0 | 29 | mActivity = mTestContext.getActivity(); |
michael@0 | 30 | mSolo = mTestContext.getSolo(); |
michael@0 | 31 | mActions = mTestContext.getActions(); |
michael@0 | 32 | } |
michael@0 | 33 | } |