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

Unified Diff: content/browser/devtools/protocol/devtools_protocol_browsertest.cc

Issue 2841463003: scheduler: Make virtual time expiration deterministic (Closed)
Patch Set: Review comments Created 3 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
Index: content/browser/devtools/protocol/devtools_protocol_browsertest.cc
diff --git a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
index 0e4199698407a79bc0e067158b70643ce8b538da..b5aee3fa1985c61f0a4a1f918d5b68a8aefc48f2 100644
--- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
+++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -1364,18 +1364,17 @@ IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, VirtualTimeTest) {
params->SetString("policy", "pause");
SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true);
- // TODO(scheduler-dev): Revisit timing when we have strict ordering
- // guarantees.
params.reset(new base::DictionaryValue());
params->SetString("expression",
- "setTimeout(function(){console.log('before')}, 1000);"
+ "setTimeout(function(){console.log('before')}, 999);"
+ "setTimeout(function(){console.log('at')}, 1000);"
"setTimeout(function(){console.log('after')}, 1002);");
SendCommand("Runtime.evaluate", std::move(params), true);
// Let virtual time advance for one second.
params.reset(new base::DictionaryValue());
params->SetString("policy", "advance");
- params->SetInteger("budget", 1001);
+ params->SetInteger("budget", 1000);
SendCommand("Emulation.setVirtualTimePolicy", std::move(params), true);
WaitForNotification("Emulation.virtualTimeBudgetExpired");

Powered by Google App Engine
This is Rietveld 408576698