Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2028)

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java

Issue 1088313006: [Android] Update ContentCommandLineTest to only use lowercase switches. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java
index 6b74559aea2e8f6c2b56a0daad36383b5a536610..145ed5a9548d4c3c24490ad82dd953a00b8f3c80 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentCommandLineTest.java
@@ -17,14 +17,14 @@ import org.chromium.content_shell_apk.ContentShellApplication;
public class ContentCommandLineTest extends NativeLibraryTestBase {
// A reference command line. Note that switch2 is [brea\d], switch3 is [and "butter"],
// and switch4 is [a "quoted" 'food'!]
- static final String INIT_SWITCHES[] = { "init_command", "--SWITCH", "Arg",
+ static final String INIT_SWITCHES[] = { "init_command", "--switch", "Arg",
"--switch2=brea\\d", "--switch3=and \"butter\"",
"--switch4=a \"quoted\" 'food'!",
"--", "--actually_an_arg" };
// The same command line, but in quoted string format.
static final char INIT_SWITCHES_BUFFER[] =
- ("init_command --SWITCH Arg --switch2=brea\\d --switch3=\"and \\\"butt\"er\\\" "
+ ("init_command --switch Arg --switch2=brea\\d --switch3=\"and \\\"butt\"er\\\" "
+ "--switch4='a \"quoted\" \\'food\\'!' "
+ "-- --actually_an_arg").toCharArray();
@@ -46,15 +46,14 @@ public class ContentCommandLineTest extends NativeLibraryTestBase {
void checkInitSwitches() {
CommandLine cl = CommandLine.getInstance();
assertFalse(cl.hasSwitch("init_command"));
- assertFalse(cl.hasSwitch("switch"));
- assertTrue(cl.hasSwitch("SWITCH"));
- assertFalse(cl.hasSwitch("--SWITCH"));
- assertFalse(cl.hasSwitch("Arg"));
+ assertTrue(cl.hasSwitch("switch"));
+ assertFalse(cl.hasSwitch("--switch"));
+ assertFalse(cl.hasSwitch("arg"));
assertFalse(cl.hasSwitch("actually_an_arg"));
assertEquals("brea\\d", cl.getSwitchValue("switch2"));
assertEquals("and \"butter\"", cl.getSwitchValue("switch3"));
assertEquals("a \"quoted\" 'food'!", cl.getSwitchValue("switch4"));
- assertNull(cl.getSwitchValue("SWITCH"));
+ assertNull(cl.getSwitchValue("switch"));
assertNull(cl.getSwitchValue("non-existant"));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698