| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/shell/webkit_test_controller.h" | 5 #include "content/shell/webkit_test_controller.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 bool handled = true; | 239 bool handled = true; |
| 240 IPC_BEGIN_MESSAGE_MAP(WebKitTestController, message) | 240 IPC_BEGIN_MESSAGE_MAP(WebKitTestController, message) |
| 241 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) | 241 IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage) |
| 242 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) | 242 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump) |
| 243 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ImageDump, OnImageDump) | 243 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ImageDump, OnImageDump) |
| 244 IPC_MESSAGE_HANDLER(ShellViewHostMsg_OverridePreferences, | 244 IPC_MESSAGE_HANDLER(ShellViewHostMsg_OverridePreferences, |
| 245 OnOverridePreferences) | 245 OnOverridePreferences) |
| 246 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TestFinished, OnTestFinished) | 246 IPC_MESSAGE_HANDLER(ShellViewHostMsg_TestFinished, OnTestFinished) |
| 247 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowDevTools, OnShowDevTools) | 247 IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowDevTools, OnShowDevTools) |
| 248 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseDevTools, OnCloseDevTools) | 248 IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseDevTools, OnCloseDevTools) |
| 249 IPC_MESSAGE_HANDLER(ShellViewHostMsg_GoToOffset, OnGoToOffset) |
| 250 IPC_MESSAGE_HANDLER(ShellViewHostMsg_Reload, OnReload) |
| 251 IPC_MESSAGE_HANDLER(ShellViewHostMsg_LoadURLForFrame, OnLoadURLForFrame) |
| 249 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotImplemented, OnNotImplemented) | 252 IPC_MESSAGE_HANDLER(ShellViewHostMsg_NotImplemented, OnNotImplemented) |
| 250 IPC_MESSAGE_UNHANDLED(handled = false) | 253 IPC_MESSAGE_UNHANDLED(handled = false) |
| 251 IPC_END_MESSAGE_MAP() | 254 IPC_END_MESSAGE_MAP() |
| 252 | 255 |
| 253 return handled; | 256 return handled; |
| 254 } | 257 } |
| 255 | 258 |
| 256 void WebKitTestController::PluginCrashed(const base::FilePath& plugin_path, | 259 void WebKitTestController::PluginCrashed(const base::FilePath& plugin_path, |
| 257 base::ProcessId plugin_pid) { | 260 base::ProcessId plugin_pid) { |
| 258 DCHECK(CalledOnValidThread()); | 261 DCHECK(CalledOnValidThread()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 395 } |
| 393 | 396 |
| 394 void WebKitTestController::OnShowDevTools() { | 397 void WebKitTestController::OnShowDevTools() { |
| 395 main_window_->ShowDevTools(); | 398 main_window_->ShowDevTools(); |
| 396 } | 399 } |
| 397 | 400 |
| 398 void WebKitTestController::OnCloseDevTools() { | 401 void WebKitTestController::OnCloseDevTools() { |
| 399 main_window_->CloseDevTools(); | 402 main_window_->CloseDevTools(); |
| 400 } | 403 } |
| 401 | 404 |
| 405 void WebKitTestController::OnGoToOffset(int offset) { |
| 406 main_window_->GoBackOrForward(offset); |
| 407 } |
| 408 |
| 409 void WebKitTestController::OnReload() { |
| 410 main_window_->Reload(); |
| 411 } |
| 412 |
| 413 void WebKitTestController::OnLoadURLForFrame(const GURL& url, |
| 414 const std::string& frame_name) { |
| 415 main_window_->LoadURLForFrame(url, frame_name); |
| 416 } |
| 417 |
| 402 void WebKitTestController::OnNotImplemented( | 418 void WebKitTestController::OnNotImplemented( |
| 403 const std::string& object_name, | 419 const std::string& object_name, |
| 404 const std::string& property_name) { | 420 const std::string& property_name) { |
| 405 printer_->AddErrorMessage( | 421 printer_->AddErrorMessage( |
| 406 std::string("FAIL: NOT IMPLEMENTED: ") + | 422 std::string("FAIL: NOT IMPLEMENTED: ") + |
| 407 object_name + "." + property_name); | 423 object_name + "." + property_name); |
| 408 } | 424 } |
| 409 | 425 |
| 410 } // namespace content | 426 } // namespace content |
| OLD | NEW |