| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/webkit_test_controller.h" | 5 #include "content/shell/browser/webkit_test_controller.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 DCHECK(CalledOnValidThread()); | 414 DCHECK(CalledOnValidThread()); |
| 415 if (current_pid_ != base::kNullProcessId) { | 415 if (current_pid_ != base::kNullProcessId) { |
| 416 printer_->AddErrorMessage(std::string("#CRASHED - renderer (pid ") + | 416 printer_->AddErrorMessage(std::string("#CRASHED - renderer (pid ") + |
| 417 base::IntToString(current_pid_) + ")"); | 417 base::IntToString(current_pid_) + ")"); |
| 418 } else { | 418 } else { |
| 419 printer_->AddErrorMessage("#CRASHED - renderer"); | 419 printer_->AddErrorMessage("#CRASHED - renderer"); |
| 420 } | 420 } |
| 421 DiscardMainWindow(); | 421 DiscardMainWindow(); |
| 422 } | 422 } |
| 423 | 423 |
| 424 void WebKitTestController::WebContentsDestroyed(WebContents* web_contents) { | 424 void WebKitTestController::WebContentsDestroyed() { |
| 425 DCHECK(CalledOnValidThread()); | 425 DCHECK(CalledOnValidThread()); |
| 426 printer_->AddErrorMessage("FAIL: main window was destroyed"); | 426 printer_->AddErrorMessage("FAIL: main window was destroyed"); |
| 427 DiscardMainWindow(); | 427 DiscardMainWindow(); |
| 428 } | 428 } |
| 429 | 429 |
| 430 void WebKitTestController::Observe(int type, | 430 void WebKitTestController::Observe(int type, |
| 431 const NotificationSource& source, | 431 const NotificationSource& source, |
| 432 const NotificationDetails& details) { | 432 const NotificationDetails& details) { |
| 433 DCHECK(CalledOnValidThread()); | 433 DCHECK(CalledOnValidThread()); |
| 434 switch (type) { | 434 switch (type) { |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 return; | 671 return; |
| 672 } | 672 } |
| 673 | 673 |
| 674 printer_->AddErrorMessage( | 674 printer_->AddErrorMessage( |
| 675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, | 675 base::StringPrintf("#LEAK - renderer pid %d (%s)", current_pid_, |
| 676 result.detail.c_str())); | 676 result.detail.c_str())); |
| 677 DiscardMainWindow(); | 677 DiscardMainWindow(); |
| 678 } | 678 } |
| 679 | 679 |
| 680 } // namespace content | 680 } // namespace content |
| OLD | NEW |