summaryrefslogtreecommitdiffstats
path: root/chrome/test/url_fetch_test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/url_fetch_test')
-rw-r--r--chrome/test/url_fetch_test/url_fetch_test.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc
index ec87c76..5729785 100644
--- a/chrome/test/url_fetch_test/url_fetch_test.cc
+++ b/chrome/test/url_fetch_test/url_fetch_test.cc
@@ -49,7 +49,7 @@ class UrlFetchTest : public UITest {
}
void RunTest(const GURL& url, const char* wait_cookie_name,
- const char* wait_cookie_value, const wchar_t* var_to_fetch,
+ const char* wait_cookie_value, const char* var_to_fetch,
UrlFetchTestResult* result) {
scoped_refptr<TabProxy> tab(GetActiveTab());
ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(url));
@@ -67,11 +67,12 @@ class UrlFetchTest : public UITest {
}
}
if (var_to_fetch) {
- std::wstring script = StringPrintf(
- L"window.domAutomationController.send(%ls);", var_to_fetch);
+ std::string script = StringPrintf(
+ "window.domAutomationController.send(%s);", var_to_fetch);
std::wstring value;
- bool success = tab->ExecuteAndExtractString(L"", script, &value);
+ bool success = tab->ExecuteAndExtractString(L"", ASCIIToWide(script),
+ &value);
ASSERT_TRUE(success);
result->javascript_variable = WideToUTF8(value);
}
@@ -121,10 +122,10 @@ TEST_F(UrlFetchTest, UrlFetch) {
std::string cookie_value =
cmd_line->GetSwitchValueASCII("wait_cookie_value");
- std::wstring jsvar = cmd_line->GetSwitchValue("jsvar");
+ std::string jsvar = cmd_line->GetSwitchValueASCII("jsvar");
UrlFetchTestResult result;
- RunTest(GURL(WideToASCII(cmd_line->GetSwitchValue("url"))),
+ RunTest(GURL(cmd_line->GetSwitchValueASCII("url")),
cookie_name.length() > 0 ? cookie_name.c_str() : NULL,
cookie_value.length() > 0 ? cookie_value.c_str() : NULL,
jsvar.length() > 0 ? jsvar.c_str() : NULL,