devtools/client/debugger/test/mochitest/browser_dbg-event-breakpoints.js intermittently fails with stencil navigation enabled
Categories
(DevTools :: Debugger, task)
Tracking
(firefox151 fixed)
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
derived from bug 2027803 comment #4.
The following assertion intermittently fails with the stencil navigation enabled, at least on linux asan, linux tsan on automation.
I can observe the issue on macOS debug build with test --verify.
await assertPausedAtSourceAndLine(dbg, eventBreakpointsSource.id, 87);
The assertion sees the line being 82, which is the previous test's line, but
info(`Check that breakpoint can be set on "beforeUnload" event`);
await toggleEventBreakpoint(dbg, "Load", "event.load.beforeunload");
let onReload = reload(dbg);
await waitForPaused(dbg);
await assertPausedAtSourceAndLine(dbg, eventBreakpointsSource.id, 82);
await resume(dbg);
await onReload;
await toggleEventBreakpoint(dbg, "Load", "event.load.beforeunload");
info(`Check that breakpoint can be set on "unload" event`);
await toggleEventBreakpoint(dbg, "Load", "event.load.unload");
onReload = reload(dbg);
await waitForPaused(dbg);
await assertPausedAtSourceAndLine(dbg, eventBreakpointsSource.id, 87);
await resume(dbg);
await onReload;
await toggleEventBreakpoint(dbg, "Load", "event.load.unload");
When I forcibly stop at the first assertion failure, the source view indeed stops at line 82, with the breakpoint being set to line 82,
and in the sidebar, both beforeunload and unload are checked.
is(
pauseLine,
expectedLine,
"Redux state for currently selected frame's line is correct"
);
Then, if I added logging for the checkbox state, in the failure case, the checkbox for the beforeunload is toggled from unchecked to checked, for both toggleEventBreakpoint calls, while the latter is supposed to toggle from checked to unchecked as a cleanup.
So, possibly either:
- the checkbox state doesn't persist for some reason
- the checkbox state hasn't been restored after reload at that point
| Assignee | ||
Comment 1•5 months ago
|
||
With the following put before the 2nd toggleEventBreakpoint call, I observe that the checkbox's checked property becomes false to true at that point.
{
const eventCheckbox = await getEventBreakpointCheckbox(
dbg, "Load", "event.load.beforeunload"
);
dump(`@@@@ checked=${eventCheckbox.checked}\n`);
await waitFor(() => {
dump(`@@@@ checked=${eventCheckbox.checked}\n`);
return eventCheckbox.checked == true;
});
dump(`@@@@ checked=${eventCheckbox.checked}\n`);
}
It means the onReload promise doesn't wait for the breakpoint state restoration, which would mean that the breakpoint state is restored after the waitForSources's condition.
async function reload(dbg, ...sources) {
await reloadSelectedTab();
return waitForSources(dbg, ...sources);
}
Anyway, the testcase (and possibly all others that uses the similar structure) should wait for the breakpoint state restoration before processing to the "uncheck" part.
| Assignee | ||
Comment 2•5 months ago
|
||
Comment 4•5 months ago
|
||
| bugherder | ||
Updated•4 months ago
|
Description
•