| Index: chrome/test/automation/tab_proxy.cc
|
| ===================================================================
|
| --- chrome/test/automation/tab_proxy.cc (revision 73805)
|
| +++ chrome/test/automation/tab_proxy.cc (working copy)
|
| @@ -22,7 +22,7 @@
|
| }
|
|
|
|
|
| -bool TabProxy::GetTabTitle(std::wstring* title) const {
|
| +bool TabProxy::GetTabTitle(string16* title) const {
|
| if (!is_valid())
|
| return false;
|
|
|
| @@ -98,8 +98,8 @@
|
| return navigate_response;
|
| }
|
|
|
| -bool TabProxy::SetAuth(const std::wstring& username,
|
| - const std::wstring& password) {
|
| +bool TabProxy::SetAuth(const string16& username,
|
| + const string16& password) {
|
| if (!is_valid())
|
| return false;
|
|
|
| @@ -233,9 +233,9 @@
|
| return sender_->Send(new AutomationMsg_TabProcessID(handle_, process_id));
|
| }
|
|
|
| -bool TabProxy::ExecuteAndExtractString(const std::wstring& frame_xpath,
|
| - const std::wstring& jscript,
|
| - std::wstring* string_value) {
|
| +bool TabProxy::ExecuteAndExtractString(const string16& frame_xpath,
|
| + const string16& jscript,
|
| + string16* string_value) {
|
| Value* root = NULL;
|
| bool succeeded = ExecuteAndExtractValue(frame_xpath, jscript, &root);
|
| if (!succeeded)
|
| @@ -247,18 +247,16 @@
|
| if (succeeded) {
|
| string16 read_value;
|
| succeeded = value->GetAsString(&read_value);
|
| - if (succeeded) {
|
| - // TODO(viettrungluu): remove conversion. (But should |jscript| be UTF-8?)
|
| - *string_value = UTF16ToWideHack(read_value);
|
| - }
|
| + if (succeeded)
|
| + *string_value = read_value;
|
| }
|
|
|
| delete root;
|
| return succeeded;
|
| }
|
|
|
| -bool TabProxy::ExecuteAndExtractBool(const std::wstring& frame_xpath,
|
| - const std::wstring& jscript,
|
| +bool TabProxy::ExecuteAndExtractBool(const string16& frame_xpath,
|
| + const string16& jscript,
|
| bool* bool_value) {
|
| Value* root = NULL;
|
| bool succeeded = ExecuteAndExtractValue(frame_xpath, jscript, &root);
|
| @@ -280,8 +278,8 @@
|
| return succeeded;
|
| }
|
|
|
| -bool TabProxy::ExecuteAndExtractInt(const std::wstring& frame_xpath,
|
| - const std::wstring& jscript,
|
| +bool TabProxy::ExecuteAndExtractInt(const string16& frame_xpath,
|
| + const string16& jscript,
|
| int* int_value) {
|
| Value* root = NULL;
|
| bool succeeded = ExecuteAndExtractValue(frame_xpath, jscript, &root);
|
| @@ -303,8 +301,8 @@
|
| return succeeded;
|
| }
|
|
|
| -bool TabProxy::ExecuteAndExtractValue(const std::wstring& frame_xpath,
|
| - const std::wstring& jscript,
|
| +bool TabProxy::ExecuteAndExtractValue(const string16& frame_xpath,
|
| + const string16& jscript,
|
| Value** value) {
|
| if (!is_valid())
|
| return false;
|
| @@ -824,8 +822,8 @@
|
| NOTREACHED();
|
| return false;
|
| }
|
| - return sender_->Send(new AutomationMsg_DomOperation(handle_, L"",
|
| - UTF8ToWide(script),
|
| + return sender_->Send(new AutomationMsg_DomOperation(handle_, string16(),
|
| + UTF8ToUTF16(script),
|
| json));
|
| }
|
|
|
|
|