diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 01:46:59 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 01:46:59 +0000 |
commit | ed578097fa1a348906fdd74ea32bf140c8f75071 (patch) | |
tree | 46decb9874a9573f64a3a86893a7dec063fa97fb /chrome/test/url_fetch_test | |
parent | abb4e8e1ecd63ce8d80e7ab514b748c2cbf201b8 (diff) | |
download | chromium_src-ed578097fa1a348906fdd74ea32bf140c8f75071.zip chromium_src-ed578097fa1a348906fdd74ea32bf140c8f75071.tar.gz chromium_src-ed578097fa1a348906fdd74ea32bf140c8f75071.tar.bz2 |
Remove GetSwitchValue() from chrome/* where easy.
Review URL: http://codereview.chromium.org/3057033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/url_fetch_test')
-rw-r--r-- | chrome/test/url_fetch_test/url_fetch_test.cc | 13 |
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, |