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

Unified Diff: chrome/test/url_fetch_test/url_fetch_test.cc

Issue 270062: Use ASCII strings for switch names. (Closed)
Patch Set: victory Created 11 years, 2 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 | « chrome/test/ui/v8_benchmark_uitest.cc ('k') | chrome/tools/crash_service/crash_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/url_fetch_test/url_fetch_test.cc
diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc
index 75be5abd01b1e0e031eea95a21c3cfa3d092a997..ed70f201eb7fe15b45c7d5051d3b0bda04d763d4 100644
--- a/chrome/test/url_fetch_test/url_fetch_test.cc
+++ b/chrome/test/url_fetch_test/url_fetch_test.cc
@@ -27,7 +27,7 @@ class UrlFetchTest : public UITest {
void SetUp() {
const CommandLine *cmdLine = CommandLine::ForCurrentProcess();
- if (cmdLine->HasSwitch(L"reference_build")) {
+ if (cmdLine->HasSwitch("reference_build")) {
FilePath dir;
PathService::Get(chrome::DIR_TEST_TOOLS, &dir);
dir = dir.AppendASCII("reference_build");
@@ -109,19 +109,19 @@ bool writeValueToFile(std::string value, std::wstring filePath) {
TEST_F(UrlFetchTest, UrlFetch) {
const CommandLine *cmdLine = CommandLine::ForCurrentProcess();
- if (!cmdLine->HasSwitch(L"url")) {
+ if (!cmdLine->HasSwitch("url")) {
return;
}
std::string cookieName =
- WideToASCII(cmdLine->GetSwitchValue(L"wait_cookie_name"));
+ cmdLine->GetSwitchValueASCII("wait_cookie_name");
std::string cookieValue =
- WideToASCII(cmdLine->GetSwitchValue(L"wait_cookie_value"));
+ cmdLine->GetSwitchValueASCII("wait_cookie_value");
- std::wstring jsvar = cmdLine->GetSwitchValue(L"jsvar");
+ std::wstring jsvar = cmdLine->GetSwitchValue("jsvar");
UrlFetchTestResult result;
- RunTest(GURL(WideToASCII(cmdLine->GetSwitchValue(L"url"))),
+ RunTest(GURL(WideToASCII(cmdLine->GetSwitchValue("url"))),
cookieName.length() > 0 ? cookieName.c_str() : NULL,
cookieValue.length() > 0 ? cookieValue.c_str() : NULL,
jsvar.length() > 0 ? jsvar.c_str() : NULL,
@@ -129,13 +129,13 @@ TEST_F(UrlFetchTest, UrlFetch) {
// Write out the cookie if requested
std::wstring cookieOutputPath =
- cmdLine->GetSwitchValue(L"wait_cookie_output");
+ cmdLine->GetSwitchValue("wait_cookie_output");
if (cookieOutputPath.length() > 0) {
ASSERT_TRUE(writeValueToFile(result.cookie_value, cookieOutputPath));
}
// Write out the JS Variable if requested
- std::wstring jsvarOutputPath = cmdLine->GetSwitchValue(L"jsvar_output");
+ std::wstring jsvarOutputPath = cmdLine->GetSwitchValue("jsvar_output");
if (jsvarOutputPath.length() > 0) {
ASSERT_TRUE(writeValueToFile(result.javascript_variable, jsvarOutputPath));
}
« no previous file with comments | « chrome/test/ui/v8_benchmark_uitest.cc ('k') | chrome/tools/crash_service/crash_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698