diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 21:28:56 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-04 21:28:56 +0000 |
commit | 461f028ab0acdd69a5af64cf45c84e91eb41396c (patch) | |
tree | d1b89cf6e6dff544ecfff0424f4f0b728b540f49 /chrome/test/url_fetch_test | |
parent | dee7c0509d0e98d1210725aad2ce6e5153780592 (diff) | |
download | chromium_src-461f028ab0acdd69a5af64cf45c84e91eb41396c.zip chromium_src-461f028ab0acdd69a5af64cf45c84e91eb41396c.tar.gz chromium_src-461f028ab0acdd69a5af64cf45c84e91eb41396c.tar.bz2 |
Revert "Remove GetSwitchValue() from chrome/* where easy."
This reverts commit r54966.
Meant to try it, not commit it, sorry everyone. :(
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54969 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, 6 insertions, 7 deletions
diff --git a/chrome/test/url_fetch_test/url_fetch_test.cc b/chrome/test/url_fetch_test/url_fetch_test.cc index 5729785..ec87c76 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 char* var_to_fetch, + const char* wait_cookie_value, const wchar_t* var_to_fetch, UrlFetchTestResult* result) { scoped_refptr<TabProxy> tab(GetActiveTab()); ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, tab->NavigateToURL(url)); @@ -67,12 +67,11 @@ class UrlFetchTest : public UITest { } } if (var_to_fetch) { - std::string script = StringPrintf( - "window.domAutomationController.send(%s);", var_to_fetch); + std::wstring script = StringPrintf( + L"window.domAutomationController.send(%ls);", var_to_fetch); std::wstring value; - bool success = tab->ExecuteAndExtractString(L"", ASCIIToWide(script), - &value); + bool success = tab->ExecuteAndExtractString(L"", script, &value); ASSERT_TRUE(success); result->javascript_variable = WideToUTF8(value); } @@ -122,10 +121,10 @@ TEST_F(UrlFetchTest, UrlFetch) { std::string cookie_value = cmd_line->GetSwitchValueASCII("wait_cookie_value"); - std::string jsvar = cmd_line->GetSwitchValueASCII("jsvar"); + std::wstring jsvar = cmd_line->GetSwitchValue("jsvar"); UrlFetchTestResult result; - RunTest(GURL(cmd_line->GetSwitchValueASCII("url")), + RunTest(GURL(WideToASCII(cmd_line->GetSwitchValue("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, |