Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1155)

Unified Diff: chrome/test/automation/tab_proxy.cc

Issue 6312154: Remove wstring from RVH's run Javascript command.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/automation/tab_proxy.cc
===================================================================
--- chrome/test/automation/tab_proxy.cc (revision 73855)
+++ 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));
}

Powered by Google App Engine
This is Rietveld 408576698