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

Unified Diff: third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)
Patch Set: mac fix 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
« no previous file with comments | « third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp b/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
index a61af48937a0923c06d94757836a7328fef5b9ae..1176d909190919cf8aec3cebe47e3c609f88342a 100644
--- a/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
+++ b/third_party/WebKit/Source/web/tests/VirtualTimeTest.cpp
@@ -61,7 +61,8 @@ void QuitRunLoop() {
// hard time limit.
void RunTasksForPeriod(double delay_ms) {
Platform::Current()->CurrentThread()->GetWebTaskRunner()->PostDelayedTask(
- BLINK_FROM_HERE, WTF::Bind(&QuitRunLoop), delay_ms);
+ BLINK_FROM_HERE, WTF::Bind(&QuitRunLoop),
+ TimeDelta::FromMillisecondsD(delay_ms));
testing::EnterRunLoop();
}
}
@@ -223,7 +224,7 @@ TEST_F(VirtualTimeTest, MAYBE_DOMTimersSuspended) {
WebViewScheduler::VirtualTimePolicy::PAUSE);
},
WTF::Unretained(WebView().Scheduler())),
- 1000);
+ TimeDelta::FromMilliseconds(1000));
// ALso schedule a second timer for the same point in time.
ExecuteJavaScript("setTimeout(() => { run_order.push(2); }, 1000);");
« no previous file with comments | « third_party/WebKit/Source/platform/testing/UnitTestHelpers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698