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 286e78b33bdc14790491072c454d117704a4bb45..fcf8b12a5fb95f573a9cab2f213ecd74b47533c9 100644 |
--- a/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
+++ b/content/browser/devtools/protocol/devtools_protocol_browsertest.cc |
@@ -1379,18 +1379,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('after')}, 1002);"); |
+ "setTimeout(function(){console.log('before')}, 999);" |
+ "setTimeout(function(){console.log('at')}, 1000);" |
+ "setTimeout(function(){console.log('after')}, 1001);"); |
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"); |
@@ -1411,7 +1410,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, VirtualTimeTest) { |
WaitForNotification("Emulation.virtualTimeBudgetExpired"); |
- EXPECT_THAT(console_messages_, ElementsAre("before", "done", "after")); |
+ EXPECT_THAT(console_messages_, ElementsAre("before", "done", "at", "after")); |
} |
// Tests that the Security.showCertificateViewer command shows the |