1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package org.chromium.base; 6 7 import android.support.test.filters.SmallTest; 8 import android.support.test.runner.AndroidJUnit4; 9 10 import org.junit.Assert; 11 import org.junit.Test; 12 import org.junit.runner.RunWith; 13 14 import org.chromium.base.test.util.CommandLineFlags; 15 import org.chromium.base.test.util.Feature; 16 17 /** 18 * Test class for {@link CommandLineInitUtil}. 19 */ 20 @RunWith(AndroidJUnit4.class) 21 public class CommandLineInitUtilTest { 22 /** 23 * Verifies that the default command line flags get set for Chrome Public tests. 24 */ 25 @Test 26 @SmallTest 27 @Feature({"CommandLine"}) testDefaultCommandLineFlagsSet()28 public void testDefaultCommandLineFlagsSet() { 29 CommandLineInitUtil.initCommandLine(CommandLineFlags.getTestCmdLineFile()); 30 Assert.assertTrue("CommandLine not initialized.", CommandLine.isInitialized()); 31 32 final CommandLine commandLine = CommandLine.getInstance(); 33 Assert.assertTrue(commandLine.hasSwitch("enable-test-intents")); 34 } 35 } 36