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

Unified Diff: chrome/browser/sessions/session_service_unittest.cc

Issue 10854217: Debug the generic session restore failure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review Created 8 years, 4 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 | « chrome/browser/sessions/session_backend.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service_unittest.cc
diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc
index 748ee7a14cd54810657a64b7e76f75b4d53f51db..802cbae31212e209941c7ade2f03b1434725830e 100644
--- a/chrome/browser/sessions/session_service_unittest.cc
+++ b/chrome/browser/sessions/session_service_unittest.cc
@@ -8,6 +8,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "base/path_service.h"
+#include "base/run_loop.h"
#include "base/scoped_temp_dir.h"
#include "base/stl_util.h"
#include "base/string_number_conversions.h"
@@ -96,6 +97,11 @@ class SessionServiceTest : public BrowserWithTestWindowTest,
// Forces closing the file.
helper_.set_service(NULL);
+ // SessionBackend posts delayed tasks and might stay alive a bit longer than
+ // SessionService. Make sure the tasks run and the backend is destroyed.
+ base::RunLoop loop;
+ loop.RunUntilIdle();
+
SessionService* session_service = new SessionService(path_);
helper_.set_service(session_service);
helper_.ReadWindows(windows);
« no previous file with comments | « chrome/browser/sessions/session_backend.cc ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698