| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.content.browser; | 5 package org.chromium.content.browser; |
| 6 | 6 |
| 7 import android.test.InstrumentationTestCase; | 7 import android.test.InstrumentationTestCase; |
| 8 import android.test.suitebuilder.annotation.MediumTest; | 8 import android.test.suitebuilder.annotation.MediumTest; |
| 9 import android.test.suitebuilder.annotation.SmallTest; | 9 import android.test.suitebuilder.annotation.SmallTest; |
| 10 | 10 |
| 11 import org.chromium.base.test.util.Feature; | 11 import org.chromium.base.test.util.Feature; |
| 12 import org.chromium.content.app.LibraryLoader; | 12 import org.chromium.content.app.LibraryLoader; |
| 13 import org.chromium.content.common.CommandLine; | 13 import org.chromium.content.common.CommandLine; |
| 14 import org.chromium.content.common.ProcessInitException; | 14 import org.chromium.content.common.ProcessInitException; |
| 15 import org.chromium.content_shell.ContentShellActivity; | 15 import org.chromium.content_shell_apk.ContentShellActivity; |
| 16 import org.chromium.content_shell.ContentShellApplication; | 16 import org.chromium.content_shell_apk.ContentShellApplication; |
| 17 | 17 |
| 18 public class CommandLineTest extends InstrumentationTestCase { | 18 public class CommandLineTest extends InstrumentationTestCase { |
| 19 // A reference command line. Note that switch2 is [brea\d], switch3 is [and
"butter"], | 19 // A reference command line. Note that switch2 is [brea\d], switch3 is [and
"butter"], |
| 20 // and switch4 is [a "quoted" 'food'!] | 20 // and switch4 is [a "quoted" 'food'!] |
| 21 static final String INIT_SWITCHES[] = { "init_command", "--SWITCH", "Arg", | 21 static final String INIT_SWITCHES[] = { "init_command", "--SWITCH", "Arg", |
| 22 "--switch2=brea\\d", "--switch3=and \"butter\"", | 22 "--switch2=brea\\d", "--switch3=and \"butter\"", |
| 23 "--switch4=a \"quoted\" 'food'!", | 23 "--switch4=a \"quoted\" 'food'!", |
| 24 "--", "--actually_an_arg" }; | 24 "--", "--actually_an_arg" }; |
| 25 | 25 |
| 26 // The same command line, but in quoted string format. | 26 // The same command line, but in quoted string format. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 190 } |
| 191 | 191 |
| 192 @MediumTest | 192 @MediumTest |
| 193 @Feature({"Android-AppBase"}) | 193 @Feature({"Android-AppBase"}) |
| 194 public void testFileInitialization() { | 194 public void testFileInitialization() { |
| 195 CommandLine.initFromFile(ContentShellActivity.COMMAND_LINE_FILE); | 195 CommandLine.initFromFile(ContentShellActivity.COMMAND_LINE_FILE); |
| 196 loadJni(); | 196 loadJni(); |
| 197 checkSettingThenGetting(); | 197 checkSettingThenGetting(); |
| 198 } | 198 } |
| 199 } | 199 } |
| OLD | NEW |