Commit 22148ab5 authored by tfarina@chromium.org's avatar tfarina@chromium.org

Convert to std::wstring as late as possible.

This is the change requested by Will.

BUG=None
TEST=None

Original Review URL: http://codereview.chromium.org/6243010/Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarWilliam Chan <willchan@chromium.org>
Reviewed-by: default avatarThiago Farina <tfarina@chromium.org>

Review URL: http://codereview.chromium.org/6299015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72254 0039d316-1c4b-4281-b951-d872f2087c98
parent d4a42b3c
...@@ -53,8 +53,8 @@ class UrlFetchTest : public UITest { ...@@ -53,8 +53,8 @@ class UrlFetchTest : public UITest {
const char* wait_cookie_name, const char* wait_cookie_name,
const char* wait_cookie_value, const char* wait_cookie_value,
const char* var_to_fetch, const char* var_to_fetch,
const std::wstring& wait_js_expr, const std::string& wait_js_expr,
const std::wstring& wait_js_frame_xpath, const std::string& wait_js_frame_xpath,
int wait_js_timeout_ms, int wait_js_timeout_ms,
UrlFetchTestResult* result) { UrlFetchTestResult* result) {
scoped_refptr<TabProxy> tab(GetActiveTab()); scoped_refptr<TabProxy> tab(GetActiveTab());
...@@ -74,9 +74,10 @@ class UrlFetchTest : public UITest { ...@@ -74,9 +74,10 @@ class UrlFetchTest : public UITest {
ASSERT_TRUE(result->cookie_value.length()); ASSERT_TRUE(result->cookie_value.length());
} }
} else if (!wait_js_expr.empty()) { } else if (!wait_js_expr.empty()) {
bool completed = WaitUntilJavaScriptCondition(tab.get(), bool completed = WaitUntilJavaScriptCondition(
wait_js_frame_xpath, tab.get(),
wait_js_expr, UTF8ToWide(wait_js_frame_xpath),
UTF8ToWide(wait_js_expr),
wait_js_timeout_ms); wait_js_timeout_ms);
ASSERT_TRUE(completed); ASSERT_TRUE(completed);
} }
...@@ -150,10 +151,10 @@ TEST_F(UrlFetchTest, UrlFetch) { ...@@ -150,10 +151,10 @@ TEST_F(UrlFetchTest, UrlFetch) {
cmd_line->GetSwitchValueASCII("wait_cookie_name"); cmd_line->GetSwitchValueASCII("wait_cookie_name");
std::string cookie_value = std::string cookie_value =
cmd_line->GetSwitchValueASCII("wait_cookie_value"); cmd_line->GetSwitchValueASCII("wait_cookie_value");
std::wstring js_expr = std::string js_expr =
UTF8ToWide(cmd_line->GetSwitchValueASCII("wait_js_expr")); cmd_line->GetSwitchValueASCII("wait_js_expr");
std::wstring js_frame_xpath = std::string js_frame_xpath =
UTF8ToWide(cmd_line->GetSwitchValueASCII("wait_js_frame_xpath")); cmd_line->GetSwitchValueASCII("wait_js_frame_xpath");
std::string js_timeout_ms_str = std::string js_timeout_ms_str =
cmd_line->GetSwitchValueASCII("wait_js_timeout"); cmd_line->GetSwitchValueASCII("wait_js_timeout");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment