summaryrefslogtreecommitdiffstats
path: root/components/test/android/browsertests_apk/src/org/chromium/components_browsertests_apk/ComponentsBrowserTestsApplication.java
blob: a8387ce9f64f799c6a38b661f2141af3ef31b8c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.components_browsertests_apk;

import android.content.Context;

import org.chromium.base.BaseChromiumApplication;
import org.chromium.base.PathUtils;
import org.chromium.base.ResourceExtractor;

/**
 * A basic content browser tests {@link android.app.Application}.
 */
public class ComponentsBrowserTestsApplication extends BaseChromiumApplication {
    private static final String[] MANDATORY_PAK_FILES =
            new String[] {"components_tests_resources.pak", "content_shell.pak", "natives_blob.bin",
                    "snapshot_blob.bin"};
    static final String PRIVATE_DATA_DIRECTORY_SUFFIX = "components_shell";

    @Override
    public void onCreate() {
        super.onCreate();
        initializeApplicationParameters(this);
    }

    public static void initializeApplicationParameters(Context context) {
        ResourceExtractor.setMandatoryPaksToExtract(0, MANDATORY_PAK_FILES);
        PathUtils.setPrivateDataDirectorySuffix(PRIVATE_DATA_DIRECTORY_SUFFIX, context);
    }
}