Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/public/test/browser_test_utils.cc

Issue 257153003: We have a problem in the process on destroying WebContentsImpl because (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebased onto origin/lkgr Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698