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

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

Issue 22363005: Switch BaseSessionService to use SequencedWorkerPool instead of FILE thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc
diff --git a/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc b/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc
index 1840bd0843be3027fd80dfc9bbb1f9ff7af4a812..8dfb56b4f3dd3781a2d1dcee87c316e5d697b2f8 100644
--- a/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc
+++ b/chrome/browser/sessions/persistent_tab_restore_service_browsertest.cc
@@ -8,6 +8,7 @@
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_service.h"
@@ -116,6 +117,7 @@ class PersistentTabRestoreServiceTest : public ChromeRenderViewHostTestHarness {
// Must set service to null first so that it is destroyed before the new
// one is created.
service_->Shutdown();
+ content::BrowserThread::GetBlockingPool()->FlushForTesting();
service_.reset();
service_.reset(new PersistentTabRestoreService(profile(), time_factory_));
SynchronousLoadTabsFromLastSession();
@@ -159,7 +161,9 @@ class PersistentTabRestoreServiceTest : public ChromeRenderViewHostTestHarness {
void SynchronousLoadTabsFromLastSession() {
// Ensures that the load is complete before continuing.
service_->LoadTabsFromLastSession();
+ content::BrowserThread::GetBlockingPool()->FlushForTesting();
base::RunLoop().RunUntilIdle();
+ content::BrowserThread::GetBlockingPool()->FlushForTesting();
}
GURL url1_;
« no previous file with comments | « chrome/browser/sessions/base_session_service.cc ('k') | chrome/browser/sessions/session_service_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698