OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.suitebuilder.annotation.MediumTest; | 7 import android.test.suitebuilder.annotation.MediumTest; |
8 | 8 |
9 import org.chromium.base.CommandLine; | 9 import org.chromium.base.CommandLine; |
10 import org.chromium.base.annotations.SuppressFBWarnings; | 10 import org.chromium.base.annotations.SuppressFBWarnings; |
(...skipping 17 matching lines...) Expand all Loading... |
28 ("init_command --switch Arg --switch2=brea\\d --switch3=\"and \\\"butt\"
er\\\" " | 28 ("init_command --switch Arg --switch2=brea\\d --switch3=\"and \\\"butt\"
er\\\" " |
29 + "--switch4='a \"quoted\" \\'food\\'!' " | 29 + "--switch4='a \"quoted\" \\'food\\'!' " |
30 + "-- --actually_an_arg").toCharArray(); | 30 + "-- --actually_an_arg").toCharArray(); |
31 | 31 |
32 static final String CL_ADDED_SWITCH = "zappo-dappo-doggy-trainer"; | 32 static final String CL_ADDED_SWITCH = "zappo-dappo-doggy-trainer"; |
33 static final String CL_ADDED_SWITCH_2 = "username"; | 33 static final String CL_ADDED_SWITCH_2 = "username"; |
34 static final String CL_ADDED_VALUE_2 = "bozo"; | 34 static final String CL_ADDED_VALUE_2 = "bozo"; |
35 | 35 |
36 @Override | 36 @Override |
37 public void setUp() throws Exception { | 37 public void setUp() throws Exception { |
| 38 super.setUp(); |
38 CommandLine.reset(); | 39 CommandLine.reset(); |
39 } | 40 } |
40 | 41 |
41 void loadJni() { | 42 void loadJni() { |
42 assertFalse(CommandLine.getInstance().isNativeImplementation()); | 43 assertFalse(CommandLine.getInstance().isNativeImplementation()); |
43 loadNativeLibraryNoBrowserProcess(); | 44 loadNativeLibraryNoBrowserProcess(); |
44 assertTrue(CommandLine.getInstance().isNativeImplementation()); | 45 assertTrue(CommandLine.getInstance().isNativeImplementation()); |
45 } | 46 } |
46 | 47 |
47 void checkInitSwitches() { | 48 void checkInitSwitches() { |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 128 |
128 @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME") | 129 @SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME") |
129 @MediumTest | 130 @MediumTest |
130 @Feature({"Android-AppBase"}) | 131 @Feature({"Android-AppBase"}) |
131 public void testFileInitialization() { | 132 public void testFileInitialization() { |
132 CommandLine.initFromFile(ContentShellApplication.COMMAND_LINE_FILE); | 133 CommandLine.initFromFile(ContentShellApplication.COMMAND_LINE_FILE); |
133 loadJni(); | 134 loadJni(); |
134 checkSettingThenGetting(); | 135 checkSettingThenGetting(); |
135 } | 136 } |
136 } | 137 } |
OLD | NEW |