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

Side by Side Diff: webkit/tools/test_shell/layout_test_controller.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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains the definition for LayoutTestController. 5 // This file contains the definition for LayoutTestController.
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "webkit/tools/test_shell/layout_test_controller.h" 9 #include "webkit/tools/test_shell/layout_test_controller.h"
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "webkit/glue/webpreferences.h" 42 #include "webkit/glue/webpreferences.h"
43 #include "webkit/support/simple_database_system.h" 43 #include "webkit/support/simple_database_system.h"
44 #include "webkit/tools/test_shell/notification_presenter.h" 44 #include "webkit/tools/test_shell/notification_presenter.h"
45 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" 45 #include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
46 #include "webkit/tools/test_shell/test_navigation_controller.h" 46 #include "webkit/tools/test_shell/test_navigation_controller.h"
47 #include "webkit/tools/test_shell/test_shell.h" 47 #include "webkit/tools/test_shell/test_shell.h"
48 #include "webkit/tools/test_shell/test_shell_devtools_agent.h" 48 #include "webkit/tools/test_shell/test_shell_devtools_agent.h"
49 #include "webkit/tools/test_shell/test_webview_delegate.h" 49 #include "webkit/tools/test_shell/test_webview_delegate.h"
50 50
51 using std::string; 51 using std::string;
52 using std::wstring;
53 52
54 using WebKit::WebBindings; 53 using WebKit::WebBindings;
55 using WebKit::WebConsoleMessage; 54 using WebKit::WebConsoleMessage;
56 using WebKit::WebElement; 55 using WebKit::WebElement;
57 using WebKit::WebScriptSource; 56 using WebKit::WebScriptSource;
58 using WebKit::WebSecurityPolicy; 57 using WebKit::WebSecurityPolicy;
59 using WebKit::WebSize; 58 using WebKit::WebSize;
60 using WebKit::WebString; 59 using WebKit::WebString;
61 using WebKit::WebURL; 60 using WebKit::WebURL;
62 61
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 if (!shell_->layout_test_mode()) 261 if (!shell_->layout_test_mode())
263 return; 262 return;
264 263
265 DCHECK(wait_until_done_); 264 DCHECK(wait_until_done_);
266 shell_->TestFinished(); 265 shell_->TestFinished();
267 wait_until_done_ = false; 266 wait_until_done_ = false;
268 } 267 }
269 268
270 void LayoutTestController::fallbackMethod( 269 void LayoutTestController::fallbackMethod(
271 const CppArgumentList& args, CppVariant* result) { 270 const CppArgumentList& args, CppVariant* result) {
272 std::wstring message(L"JavaScript ERROR: unknown method called on LayoutTestCo ntroller"); 271 std::string message(
272 "JavaScript ERROR: unknown method called on LayoutTestController");
273 if (!shell_->layout_test_mode()) { 273 if (!shell_->layout_test_mode()) {
274 logging::LogMessage("CONSOLE:", 0).stream() << message; 274 logging::LogMessage("CONSOLE:", 0).stream() << message;
275 } else { 275 } else {
276 printf("CONSOLE MESSAGE: %S\n", message.c_str()); 276 printf("CONSOLE MESSAGE: %s\n", message.c_str());
277 } 277 }
278 result->SetNull(); 278 result->SetNull();
279 } 279 }
280 280
281 void LayoutTestController::LogErrorToConsole(const std::string& text) { 281 void LayoutTestController::LogErrorToConsole(const std::string& text) {
282 shell_->delegate()->didAddMessageToConsole( 282 shell_->delegate()->didAddMessageToConsole(
283 WebConsoleMessage(WebConsoleMessage::LevelError, 283 WebConsoleMessage(WebConsoleMessage::LevelError,
284 WebString::fromUTF8(text)), 284 WebString::fromUTF8(text)),
285 WebString(), 0); 285 WebString(), 0);
286 } 286 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/image_decoder_unittest.cc ('k') | webkit/tools/test_shell/mac/test_webview_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698