Commit 76e0e4d3 authored by Wanming Lin's avatar Wanming Lin Committed by Chromium LUCI CQ

[DevTools] Make some breakpoints-related tests work better with true setTimeout 0

Currently SetTimeout(..., 0) is clamped up to 1ms in Chromium while which
is not supposed to be in the spec. The Speedometer2 performance can boost
~1% on Windows without it based on Pinpoint perf. This CL is intended
to fix the devtool tests that become flaky with

https://chromium-review.googlesource.com/c/chromium/src/+/2578703

Bug: 402694
Change-Id: I1ea3747aa97ea8e40ef8d5e7c3cc997ea687bcd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2603037Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Commit-Queue: Wanming Lin <wanming.lin@intel.com>
Cr-Commit-Position: refs/heads/master@{#841917}
parent 42a72ddb
......@@ -21,7 +21,8 @@
SourcesTestRunner.waitUntilPaused(didPause);
SourcesTestRunner.createNewBreakpoint(currentSourceFrame, 13, '', true)
.then(() => SourcesTestRunner.waitBreakpointSidebarPane())
.then(() => SourcesTestRunner.runTestFunction());
.then(() => setTimeout(() =>
SourcesTestRunner.runTestFunction(), 1));
}
async function didPause(callFrames) {
......
......@@ -22,7 +22,8 @@
SourcesTestRunner
.createNewBreakpoint(currentSourceFrame, 13, 'true', true)
.then(() => SourcesTestRunner.waitBreakpointSidebarPane())
.then(() => SourcesTestRunner.runTestFunction());
.then(() => setTimeout(() =>
SourcesTestRunner.runTestFunction(), 1));
}
async function didPause(callFrames) {
......
......@@ -40,7 +40,7 @@
function evaluateF2() {
SourcesTestRunner.waitUntilPaused(pausedInF2);
TestRunner.evaluateInPageWithTimeout('f2()');
setTimeout(() => TestRunner.evaluateInPageAnonymously('f2()'), 1);
}
async function pausedInF2(callFrames) {
......
......@@ -39,7 +39,7 @@
function evaluateF2() {
SourcesTestRunner.waitUntilPaused(pausedInF2);
TestRunner.evaluateInPageWithTimeout('f2()');
setTimeout(() => TestRunner.evaluateInPageAnonymously('f2()'), 1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment