Closed Bug 2091373 Opened 17 days ago Closed 10 days ago

browser_last_window_close_trigger.js fails when run twice in the same browser (Bypass metric not recorded yet - 1 == null)

Categories

(Firefox :: General, task)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

test_second_close_attempt_does_not_redispatch in browser_last_window_close_trigger.js checks the absolute value of the Glean counter messagingSystem.lastWindowCloseTriggerBypassed (null, then 1). Glean counters keep their value for as long as the process runs, so when the test runs a second time in the same browser (as the upcoming mochitest-browser-chrome-repeat jobs do), the checks see 1 and 2 instead.

The fix is to call Services.fog.testResetFOG() at the start of the task.

The Bugbug bot thinks this bug should belong to the 'Toolkit::Telemetry' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Telemetry
Product: Firefox → Toolkit

The lastWindowCloseTriggerBypassed counter keeps the value recorded by a previous run of the test in the same browser, so test_second_close_attempt_does_not_redispatch failed when the test was run twice.

Component: Telemetry → General
Product: Toolkit → Firefox
Blocks: 2092566
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/8e2560c28de1 https://hg.mozilla.org/integration/autoland/rev/111c7e63734d Reset FOG in browser_last_window_close_trigger.js before checking the bypass counter, r=omc-reviewers,aminomancer.
Status: ASSIGNED → RESOLVED
Closed: 10 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
QA Whiteboard: [qa-triage-done-c163/b162]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: