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

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

Issue 409743003: Use content::RunBlockingPoolTask() in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 3 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/session_service_test_helper.cc
diff --git a/chrome/browser/sessions/session_service_test_helper.cc b/chrome/browser/sessions/session_service_test_helper.cc
index 0a1f98289f14d9709a01949f75a5ae72ce0017d5..2c2fc404ba7ff422d190a50781b9beb45bc46939 100644
--- a/chrome/browser/sessions/session_service_test_helper.cc
+++ b/chrome/browser/sessions/session_service_test_helper.cc
@@ -12,6 +12,7 @@
#include "components/sessions/serialized_navigation_entry_test_helper.h"
#include "components/sessions/session_id.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
using base::Time;
@@ -64,8 +65,8 @@ void SessionServiceTestHelper::ReadWindows(
read_commands.get(), windows, active_window_id);
}
-void SessionServiceTestHelper::AssertTabEquals(SessionID& window_id,
- SessionID& tab_id,
+void SessionServiceTestHelper::AssertTabEquals(const SessionID& window_id,
+ const SessionID& tab_id,
int visual_index,
int nav_index,
size_t nav_count,
@@ -109,7 +110,7 @@ SessionBackend* SessionServiceTestHelper::backend() {
void SessionServiceTestHelper::SetService(SessionService* service) {
service_.reset(service);
// Execute IO tasks posted by the SessionService.
- content::BrowserThread::GetBlockingPool()->FlushForTesting();
+ content::RunAllBlockingPoolTasksUntilIdle();
}
void SessionServiceTestHelper::RunTaskOnBackendThread(

Powered by Google App Engine
This is Rietveld 408576698