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

Unified Diff: base/deferred_sequenced_task_runner_unittest.cc

Issue 2103333006: Remove calls to deprecated MessageLoop methods in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | base/files/file_path_watcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/deferred_sequenced_task_runner_unittest.cc
diff --git a/base/deferred_sequenced_task_runner_unittest.cc b/base/deferred_sequenced_task_runner_unittest.cc
index 1ddc3542496cac4548db160b45f6a223ed8761e2..e34827ab9eee317244d721b0b77e339822c954f9 100644
--- a/base/deferred_sequenced_task_runner_unittest.cc
+++ b/base/deferred_sequenced_task_runner_unittest.cc
@@ -8,6 +8,7 @@
#include "base/bind_helpers.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
+#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
@@ -69,14 +70,14 @@ class DeferredSequencedTaskRunnerTest : public testing::Test,
TEST_F(DeferredSequencedTaskRunnerTest, Stopped) {
PostExecuteTask(1);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre());
}
TEST_F(DeferredSequencedTaskRunnerTest, Start) {
StartRunner();
PostExecuteTask(1);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre(1));
}
@@ -85,34 +86,34 @@ TEST_F(DeferredSequencedTaskRunnerTest, StartWithMultipleElements) {
for (int i = 1; i < 5; ++i)
PostExecuteTask(i);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre(1, 2, 3, 4));
}
TEST_F(DeferredSequencedTaskRunnerTest, DeferredStart) {
PostExecuteTask(1);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre());
StartRunner();
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre(1));
PostExecuteTask(2);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre(1, 2));
}
TEST_F(DeferredSequencedTaskRunnerTest, DeferredStartWithMultipleElements) {
for (int i = 1; i < 5; ++i)
PostExecuteTask(i);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre());
StartRunner();
for (int i = 5; i < 9; ++i)
PostExecuteTask(i);
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_, testing::ElementsAre(1, 2, 3, 4, 5, 6, 7, 8));
}
@@ -139,7 +140,7 @@ TEST_F(DeferredSequencedTaskRunnerTest, DeferredStartWithMultipleThreads) {
}
}
- loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_THAT(executed_task_ids_,
testing::WhenSorted(testing::ElementsAre(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)));
}
« no previous file with comments | « no previous file | base/files/file_path_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698