summaryrefslogtreecommitdiffstats
path: root/chromium/base/android/javatests/src/org/chromium/base/CommandLineInitUtilTest.java
blob: 448b3a51140cca10642dd3d0b29124924f32e98a (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
33
34
35
36
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.base;

import android.support.test.runner.AndroidJUnit4;

import androidx.test.filters.SmallTest;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature;

/**
 * Test class for {@link CommandLineInitUtil}.
 */
@RunWith(AndroidJUnit4.class)
public class CommandLineInitUtilTest {
    /**
     * Verifies that the default command line flags get set for Chrome Public tests.
     */
    @Test
    @SmallTest
    @Feature({"CommandLine"})
    public void testDefaultCommandLineFlagsSet() {
        CommandLineInitUtil.initCommandLine(CommandLineFlags.getTestCmdLineFile());
        Assert.assertTrue("CommandLine not initialized.", CommandLine.isInitialized());

        final CommandLine commandLine = CommandLine.getInstance();
        Assert.assertTrue(commandLine.hasSwitch("enable-test-intents"));
    }
}