| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.base; | 5 package org.chromium.base; |
| 6 | 6 |
| 7 import android.support.test.filters.SmallTest; |
| 7 import android.test.InstrumentationTestCase; | 8 import android.test.InstrumentationTestCase; |
| 8 import android.test.suitebuilder.annotation.SmallTest; | |
| 9 | 9 |
| 10 import org.chromium.base.test.util.Feature; | 10 import org.chromium.base.test.util.Feature; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * Test class for {@link CommandLineInitUtil}. | 13 * Test class for {@link CommandLineInitUtil}. |
| 14 */ | 14 */ |
| 15 public class CommandLineInitUtilTest extends InstrumentationTestCase { | 15 public class CommandLineInitUtilTest extends InstrumentationTestCase { |
| 16 | 16 |
| 17 @Override | 17 @Override |
| 18 public void setUp() throws Exception { | 18 public void setUp() throws Exception { |
| 19 CommandLineInitUtil.initCommandLine(getInstrumentation().getTargetContex
t(), | 19 CommandLineInitUtil.initCommandLine(getInstrumentation().getTargetContex
t(), |
| 20 "chrome-command-line"); | 20 "chrome-command-line"); |
| 21 } | 21 } |
| 22 | 22 |
| 23 /** | 23 /** |
| 24 * Verifies that the default command line flags get set for Chrome Public te
sts. | 24 * Verifies that the default command line flags get set for Chrome Public te
sts. |
| 25 */ | 25 */ |
| 26 @SmallTest | 26 @SmallTest |
| 27 @Feature({"CommandLine"}) | 27 @Feature({"CommandLine"}) |
| 28 public void testDefaultCommandLineFlagsSet() { | 28 public void testDefaultCommandLineFlagsSet() { |
| 29 assertTrue("CommandLine not initialized after startup", CommandLine.isIn
itialized()); | 29 assertTrue("CommandLine not initialized after startup", CommandLine.isIn
itialized()); |
| 30 | 30 |
| 31 final CommandLine commandLine = CommandLine.getInstance(); | 31 final CommandLine commandLine = CommandLine.getInstance(); |
| 32 assertTrue(commandLine.hasSwitch("enable-test-intents")); | 32 assertTrue(commandLine.hasSwitch("enable-test-intents")); |
| 33 } | 33 } |
| 34 } | 34 } |
| OLD | NEW |