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

Unified Diff: base/message_loop/message_loop_test.cc

Issue 1926813005: Remove MessageLoop::PostNonNestableDelayedTask(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ios Created 4 years, 8 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 | « base/message_loop/message_loop_test.h ('k') | ios/web/web_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop_test.cc
diff --git a/base/message_loop/message_loop_test.cc b/base/message_loop/message_loop_test.cc
index c0e6481c4209b785a9bfee60800b63b5f73080d1..9a22e82ec17c518655189bb758f6bccc23c63017 100644
--- a/base/message_loop/message_loop_test.cc
+++ b/base/message_loop/message_loop_test.cc
@@ -637,8 +637,7 @@ void SleepFunc(TaskList* order, int cookie, TimeDelta delay) {
}
// Tests that non nestable tasks don't run when there's code in the call stack.
-void RunTest_NonNestableInNestedLoop(MessagePumpFactory factory,
- bool use_delayed) {
+void RunTest_NonNestableInNestedLoop(MessagePumpFactory factory) {
std::unique_ptr<MessagePump> pump(factory());
MessageLoop loop(std::move(pump));
@@ -647,16 +646,9 @@ void RunTest_NonNestableInNestedLoop(MessagePumpFactory factory,
MessageLoop::current()->PostTask(
FROM_HERE,
Bind(&FuncThatPumps, &order, 1));
- if (use_delayed) {
- MessageLoop::current()->PostNonNestableDelayedTask(
- FROM_HERE,
- Bind(&OrderedFunc, &order, 2),
- TimeDelta::FromMilliseconds(1));
- } else {
- MessageLoop::current()->PostNonNestableTask(
- FROM_HERE,
- Bind(&OrderedFunc, &order, 2));
- }
+ MessageLoop::current()->PostNonNestableTask(
+ FROM_HERE,
+ Bind(&OrderedFunc, &order, 2));
MessageLoop::current()->PostTask(FROM_HERE,
Bind(&OrderedFunc, &order, 3));
MessageLoop::current()->PostTask(
@@ -664,16 +656,9 @@ void RunTest_NonNestableInNestedLoop(MessagePumpFactory factory,
Bind(&SleepFunc, &order, 4, TimeDelta::FromMilliseconds(50)));
MessageLoop::current()->PostTask(FROM_HERE,
Bind(&OrderedFunc, &order, 5));
- if (use_delayed) {
- MessageLoop::current()->PostNonNestableDelayedTask(
- FROM_HERE,
- Bind(&QuitFunc, &order, 6),
- TimeDelta::FromMilliseconds(2));
- } else {
- MessageLoop::current()->PostNonNestableTask(
- FROM_HERE,
- Bind(&QuitFunc, &order, 6));
- }
+ MessageLoop::current()->PostNonNestableTask(
+ FROM_HERE,
+ Bind(&QuitFunc, &order, 6));
MessageLoop::current()->Run();
« no previous file with comments | « base/message_loop/message_loop_test.h ('k') | ios/web/web_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698