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

Unified Diff: content/public/test/test_navigation_observer.cc

Issue 2635203002: Quit immediately in TestNavigationObserver. (Closed)
Patch Set: Add comment. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/test_navigation_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_navigation_observer.cc
diff --git a/content/public/test/test_navigation_observer.cc b/content/public/test/test_navigation_observer.cc
index 6f48b2f23f9978b47b2f4e615bb6f83988874b17..dcaf9560d42289f7908c4b36c9ada4012af87907 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -79,32 +79,23 @@ class TestNavigationObserver::TestWebContentsObserver
TestNavigationObserver::TestNavigationObserver(
WebContents* web_contents,
- int number_of_navigations)
+ int number_of_navigations,
+ MessageLoopRunner::QuitMode quit_mode)
: navigation_started_(false),
navigations_completed_(0),
number_of_navigations_(number_of_navigations),
- message_loop_runner_(new MessageLoopRunner),
+ message_loop_runner_(new MessageLoopRunner(quit_mode)),
web_contents_created_callback_(
- base::Bind(
- &TestNavigationObserver::OnWebContentsCreated,
- base::Unretained(this))) {
+ base::Bind(&TestNavigationObserver::OnWebContentsCreated,
+ base::Unretained(this))) {
if (web_contents)
RegisterAsObserver(web_contents);
}
TestNavigationObserver::TestNavigationObserver(
- WebContents* web_contents)
- : navigation_started_(false),
- navigations_completed_(0),
- number_of_navigations_(1),
- message_loop_runner_(new MessageLoopRunner),
- web_contents_created_callback_(
- base::Bind(
- &TestNavigationObserver::OnWebContentsCreated,
- base::Unretained(this))) {
- if (web_contents)
- RegisterAsObserver(web_contents);
-}
+ WebContents* web_contents,
+ MessageLoopRunner::QuitMode quit_mode)
+ : TestNavigationObserver(web_contents, 1, quit_mode) {}
TestNavigationObserver::~TestNavigationObserver() {
StopWatchingNewWebContents();
« no previous file with comments | « content/public/test/test_navigation_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698