| Index: chrome/install_static/install_util_unittest.cc
|
| diff --git a/chrome/install_static/install_util_unittest.cc b/chrome/install_static/install_util_unittest.cc
|
| index b09241f39eb64718fee10aa1029a2a9bfd6e8ca4..79ee9e70d9ca8720510e48e0fa4ab32bb849a4cc 100644
|
| --- a/chrome/install_static/install_util_unittest.cc
|
| +++ b/chrome/install_static/install_util_unittest.cc
|
| @@ -39,65 +39,67 @@ TEST(InstallStaticTest, MatchPattern) {
|
| // Tests the install_static::GetSwitchValueFromCommandLine function.
|
| TEST(InstallStaticTest, GetSwitchValueFromCommandLineTest) {
|
| // Simple case with one switch.
|
| - std::string value =
|
| - GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe --type=bar", "type");
|
| + std::wstring value =
|
| + GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe --type=bar", L"type");
|
| EXPECT_EQ("bar", value);
|
|
|
| // Multiple switches with trailing spaces between them.
|
| value = GetSwitchValueFromCommandLine(
|
| - "c:\\temp\\bleh.exe --type=bar --abc=def bleh", "abc");
|
| - EXPECT_EQ("def", value);
|
| + L"c:\\temp\\bleh.exe --type=bar --abc=def bleh", L"abc");
|
| + EXPECT_EQ(L"def", value);
|
|
|
| // Multiple switches with trailing spaces and tabs between them.
|
| value = GetSwitchValueFromCommandLine(
|
| - "c:\\temp\\bleh.exe --type=bar \t\t\t --abc=def bleh", "abc");
|
| + L"c:\\temp\\bleh.exe --type=bar \t\t\t --abc=def bleh", L"abc");
|
| EXPECT_EQ("def", value);
|
|
|
| // Non existent switch.
|
| value = GetSwitchValueFromCommandLine(
|
| - "c:\\temp\\bleh.exe --foo=bar --abc=def bleh", "type");
|
| - EXPECT_EQ("", value);
|
| + L"c:\\temp\\bleh.exe --foo=bar --abc=def bleh", L"type");
|
| + EXPECT_EQ(L"", value);
|
|
|
| // Non existent switch.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe", "type");
|
| - EXPECT_EQ("", value);
|
| + value = GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe", L"type");
|
| + EXPECT_EQ(L"", value);
|
|
|
| // Non existent switch.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe type=bar", "type");
|
| - EXPECT_EQ("", value);
|
| + value =
|
| + GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe type=bar", L"type");
|
| + EXPECT_EQ(L"", value);
|
|
|
| // Trailing spaces after the switch.
|
| value = GetSwitchValueFromCommandLine(
|
| - "c:\\temp\\bleh.exe --type=bar \t\t", "type");
|
| - EXPECT_EQ("bar", value);
|
| + L"c:\\temp\\bleh.exe --type=bar \t\t", L"type");
|
| + EXPECT_EQ(L"bar", value);
|
|
|
| // Multiple switches with trailing spaces and tabs between them.
|
| value = GetSwitchValueFromCommandLine(
|
| - "c:\\temp\\bleh.exe --type=bar \t\t --foo=bleh", "foo");
|
| - EXPECT_EQ("bleh", value);
|
| + L"c:\\temp\\bleh.exe --type=bar \t\t --foo=bleh", L"foo");
|
| + EXPECT_EQ(L"bleh", value);
|
|
|
| // Nothing after a switch.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe --type=", "type");
|
| + value = GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe --type=", L"type");
|
| EXPECT_TRUE(value.empty());
|
|
|
| // Whitespace after a switch.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe --type= ", "type");
|
| + value =
|
| + GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe --type= ", L"type");
|
| EXPECT_TRUE(value.empty());
|
|
|
| // Just tabs after a switch.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe --type=\t\t\t",
|
| - "type");
|
| + value = GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe --type=\t\t\t",
|
| + L"type");
|
| EXPECT_TRUE(value.empty());
|
|
|
| // Whitespace after the "=" before the value.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe --type= bar",
|
| - "type");
|
| - EXPECT_EQ("bar", value);
|
| + value =
|
| + GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe --type= bar", L"type");
|
| + EXPECT_EQ(L"bar", value);
|
|
|
| // Tabs after the "=" before the value.
|
| - value = GetSwitchValueFromCommandLine("c:\\temp\\bleh.exe --type=\t\t\tbar",
|
| - "type");
|
| - EXPECT_EQ(value, "bar");
|
| + value = GetSwitchValueFromCommandLine(L"c:\\temp\\bleh.exe --type=\t\t\tbar",
|
| + L"type");
|
| + EXPECT_EQ(value, L"bar");
|
| }
|
|
|
| TEST(InstallStaticTest, BrowserProcessTest) {
|
|
|