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

Unified Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 8983009: Remove more wstrings in webkit/tools/test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 12 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: webkit/tools/test_shell/test_webview_delegate.cc
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 6425bbd4ba2e117dc7bc19f468c9182bceb82093..e4f785da86d3222800bf794958341b81058ba828 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -454,7 +454,7 @@ WebString TestWebViewDelegate::autoCorrectWord(const WebString& word) {
void TestWebViewDelegate::runModalAlertDialog(
WebFrame* frame, const WebString& message) {
if (!shell_->layout_test_mode()) {
- ShowJavaScriptAlert(UTF16ToWideHack(message));
+ ShowJavaScriptAlert(message);
} else {
printf("ALERT: %s\n", message.utf8().data());
}
@@ -768,8 +768,8 @@ void TestWebViewDelegate::didStartProvisionalLoad(WebFrame* frame) {
}
if (shell_->layout_test_controller()->StopProvisionalFrameLoads()) {
- printf("%S - stopping load in didStartProvisionalLoadForFrame callback\n",
- GetFrameDescription(frame).c_str());
+ printf("%s - stopping load in didStartProvisionalLoadForFrame callback\n",
+ UTF16ToUTF8(GetFrameDescription(frame)).c_str());
frame->stopLoading();
}
UpdateAddressBar(frame->view());
@@ -836,8 +836,8 @@ void TestWebViewDelegate::didReceiveTitle(
void TestWebViewDelegate::didFinishDocumentLoad(WebFrame* frame) {
unsigned pending_unload_events = frame->unloadListenerCount();
if (pending_unload_events) {
- printf("%S - has %u onunload handler(s)\n",
- GetFrameDescription(frame).c_str(), pending_unload_events);
+ printf("%s - has %u onunload handler(s)\n",
+ UTF16ToUTF8(GetFrameDescription(frame)).c_str(), pending_unload_events);
}
}
@@ -1137,20 +1137,21 @@ void TestWebViewDelegate::UpdateSessionHistory(WebFrame* frame) {
entry->SetContentState(webkit_glue::HistoryItemToString(history_item));
}
-std::wstring TestWebViewDelegate::GetFrameDescription(WebFrame* webframe) {
- std::wstring name = UTF16ToWideHack(webframe->name());
+string16 TestWebViewDelegate::GetFrameDescription(WebFrame* webframe) {
+ std::string name = UTF16ToUTF8(webframe->name());
if (webframe == shell_->webView()->mainFrame()) {
if (name.length())
- return L"main frame \"" + name + L"\"";
+ name = "main frame \"" + name + "\"";
else
- return L"main frame";
+ name = "main frame";
} else {
if (name.length())
- return L"frame \"" + name + L"\"";
+ name = "frame \"" + name + "\"";
else
- return L"frame (anonymous)";
+ name = "frame (anonymous)";
}
+ return UTF8ToUTF16(name);
}
void TestWebViewDelegate::set_fake_window_rect(const WebRect& rect) {
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.h ('k') | webkit/tools/test_shell/test_webview_delegate_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698