| 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/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 EXPECT_TRUE(web_contents != NULL); | 592 EXPECT_TRUE(web_contents != NULL); |
| 593 } | 593 } |
| 594 | 594 |
| 595 WebContentsDestroyedWatcher::~WebContentsDestroyedWatcher() { | 595 WebContentsDestroyedWatcher::~WebContentsDestroyedWatcher() { |
| 596 } | 596 } |
| 597 | 597 |
| 598 void WebContentsDestroyedWatcher::Wait() { | 598 void WebContentsDestroyedWatcher::Wait() { |
| 599 message_loop_runner_->Run(); | 599 message_loop_runner_->Run(); |
| 600 } | 600 } |
| 601 | 601 |
| 602 void WebContentsDestroyedWatcher::WebContentsDestroyed( | 602 void WebContentsDestroyedWatcher::WebContentsDestroyed() { |
| 603 WebContents* web_contents) { | |
| 604 message_loop_runner_->Quit(); | 603 message_loop_runner_->Quit(); |
| 605 } | 604 } |
| 606 | 605 |
| 607 RenderProcessHostWatcher::RenderProcessHostWatcher( | 606 RenderProcessHostWatcher::RenderProcessHostWatcher( |
| 608 RenderProcessHost* render_process_host, WatchType type) | 607 RenderProcessHost* render_process_host, WatchType type) |
| 609 : render_process_host_(render_process_host), | 608 : render_process_host_(render_process_host), |
| 610 type_(type), | 609 type_(type), |
| 611 message_loop_runner_(new MessageLoopRunner) { | 610 message_loop_runner_(new MessageLoopRunner) { |
| 612 render_process_host_->AddObserver(this); | 611 render_process_host_->AddObserver(this); |
| 613 } | 612 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 } | 673 } |
| 675 // The queue should not be empty, unless we were quit because of a timeout. | 674 // The queue should not be empty, unless we were quit because of a timeout. |
| 676 if (message_queue_.empty()) | 675 if (message_queue_.empty()) |
| 677 return false; | 676 return false; |
| 678 *message = message_queue_.front(); | 677 *message = message_queue_.front(); |
| 679 message_queue_.pop(); | 678 message_queue_.pop(); |
| 680 return true; | 679 return true; |
| 681 } | 680 } |
| 682 | 681 |
| 683 } // namespace content | 682 } // namespace content |
| OLD | NEW |