mobile/android/base/tests/helpers/HelperInitializer.java

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mobile/android/base/tests/helpers/HelperInitializer.java	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,28 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +package org.mozilla.gecko.tests.helpers;
     1.9 +
    1.10 +import org.mozilla.gecko.tests.UITestContext;
    1.11 +
    1.12 +/**
    1.13 + * AssertionHelper is statically imported in many places. Thus we want to hide
    1.14 + * its init method outside of this package. We initialize the remaining helper
    1.15 + * classes from here so that all the init methods are package protected.
    1.16 + */
    1.17 +public final class HelperInitializer {
    1.18 +
    1.19 +    private HelperInitializer() { /* To disallow instantiation. */ }
    1.20 +
    1.21 +    public static void init(final UITestContext context) {
    1.22 +        // Other helpers make assertions so init AssertionHelper first.
    1.23 +        AssertionHelper.init(context);
    1.24 +
    1.25 +        DeviceHelper.init(context);
    1.26 +        GeckoHelper.init(context);
    1.27 +        JavascriptBridge.init(context);
    1.28 +        NavigationHelper.init(context);
    1.29 +        WaitHelper.init(context);
    1.30 +    }
    1.31 +}

mercurial