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/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 return handled; | 266 return handled; |
267 } | 267 } |
268 | 268 |
269 void WebKitTestController::PluginCrashed(const FilePath& plugin_path) { | 269 void WebKitTestController::PluginCrashed(const FilePath& plugin_path) { |
270 DCHECK(CalledOnValidThread()); | 270 DCHECK(CalledOnValidThread()); |
271 printer_->AddErrorMessage("#CRASHED - plugin"); | 271 printer_->AddErrorMessage("#CRASHED - plugin"); |
272 } | 272 } |
273 | 273 |
274 void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) { | 274 void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) { |
275 DCHECK(CalledOnValidThread()); | 275 DCHECK(CalledOnValidThread()); |
276 // Might be kNullProcessId, in which case we will receive a notification later | 276 // Might be kNullProcessHandle, in which case we will receive a notification |
277 // when the RenderProcessHost was created. | 277 // later when the RenderProcessHost was created. |
278 current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle()); | 278 if (render_view_host->GetProcess()->GetHandle() != base::kNullProcessHandle) |
| 279 current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle()); |
279 render_view_host->Send(new ShellViewMsg_SetCurrentWorkingDirectory( | 280 render_view_host->Send(new ShellViewMsg_SetCurrentWorkingDirectory( |
280 render_view_host->GetRoutingID(), current_working_directory_)); | 281 render_view_host->GetRoutingID(), current_working_directory_)); |
281 } | 282 } |
282 | 283 |
283 void WebKitTestController::RenderViewGone(base::TerminationStatus status) { | 284 void WebKitTestController::RenderViewGone(base::TerminationStatus status) { |
284 DCHECK(CalledOnValidThread()); | 285 DCHECK(CalledOnValidThread()); |
285 if (current_pid_ != base::kNullProcessId) { | 286 if (current_pid_ != base::kNullProcessId) { |
286 printer_->AddErrorMessage(std::string("#CRASHED - renderer (pid ") + | 287 printer_->AddErrorMessage(std::string("#CRASHED - renderer (pid ") + |
287 base::IntToString(current_pid_) + ")"); | 288 base::IntToString(current_pid_) + ")"); |
288 } else { | 289 } else { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 496 |
496 void WebKitTestController::OnNotImplemented( | 497 void WebKitTestController::OnNotImplemented( |
497 const std::string& object_name, | 498 const std::string& object_name, |
498 const std::string& property_name) { | 499 const std::string& property_name) { |
499 printer_->AddErrorMessage( | 500 printer_->AddErrorMessage( |
500 std::string("FAIL: NOT IMPLEMENTED: ") + | 501 std::string("FAIL: NOT IMPLEMENTED: ") + |
501 object_name + "." + property_name); | 502 object_name + "." + property_name); |
502 } | 503 } |
503 | 504 |
504 } // namespace content | 505 } // namespace content |
OLD | NEW |