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

Unified Diff: content/browser/storage_partition_impl_map_unittest.cc

Issue 2879963002: Use TaskScheduler instead of SequencedWorkerPool in storage_partition_impl_map.cc. (Closed)
Patch Set: fix-build-errors Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/storage_partition_impl_map_unittest.cc
diff --git a/content/browser/storage_partition_impl_map_unittest.cc b/content/browser/storage_partition_impl_map_unittest.cc
index 2b8cc09f8838728309a2c72c6f4e8d32c4fc5d6d..06dff808934f58d462bd01b903382ef5bc40be55 100644
--- a/content/browser/storage_partition_impl_map_unittest.cc
+++ b/content/browser/storage_partition_impl_map_unittest.cc
@@ -7,9 +7,8 @@
#include <utility>
#include "base/files/file_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
-#include "content/public/browser/browser_thread.h"
+#include "base/test/scoped_task_environment.h"
#include "content/public/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -67,7 +66,7 @@ TEST(StoragePartitionConfigTest, OperatorLess) {
TEST(StoragePartitionImplMapTest, GarbageCollect) {
TestBrowserContext browser_context;
- base::MessageLoop message_loop;
+ base::test::ScopedTaskEnvironment scoped_task_environment;
StoragePartitionImplMap storage_partition_impl_map(&browser_context);
std::unique_ptr<base::hash_set<base::FilePath>> active_paths(
@@ -88,7 +87,7 @@ TEST(StoragePartitionImplMapTest, GarbageCollect) {
storage_partition_impl_map.GarbageCollect(std::move(active_paths),
run_loop.QuitClosure());
run_loop.Run();
- BrowserThread::GetBlockingPool()->FlushForTesting();
+ scoped_task_environment.RunUntilIdle();
EXPECT_TRUE(base::PathExists(active_path));
EXPECT_FALSE(base::PathExists(inactive_path));

Powered by Google App Engine
This is Rietveld 408576698