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