Closed Bug 1702637 Opened 5 years ago Closed 1 year ago

BrowserTestUtils.switchTab should not wait for an implied timer from AsyncTabSwitcher

Categories

(Firefox :: General, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
141 Branch
Tracking Status
firefox141 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Depends on 2 open bugs, Blocks 1 open bug, Regressed 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

BrowserTestUtils.switchTab waits for the TabSwitchDone event from AsyncTabSwitcher, but that event happens after a 300ms timer.

On debug builds that doesn't change the timing much, but on optimized builds, that makes the tests run significantly slower than they need to.

I'm going to attach a WIP patch, but if we want to go ahead with it I'll have lots of tests to debug, as my try run is currently pretty orange: https://treeherder.mozilla.org/jobs?repo=try&revision=d44cba986ec22d6e32218c2fd5573bda5151bad0

Assignee: nobody → florian
Status: NEW → ASSIGNED
See Also: → 1745267

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → florian
Status: NEW → ASSIGNED

Resetting the assignee as I'm not actively working on this. But I still think this is worth fixing!

Assignee: florian → nobody
Status: ASSIGNED → NEW
Assignee: nobody → florian
Status: NEW → ASSIGNED
Attachment #9213191 - Attachment is obsolete: true
See Also: → 1703712
No longer blocks: 1703712
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e548bf7e11b0 https://hg.mozilla.org/integration/autoland/rev/83d172a8677f make BrowserTestUtils.switchTab wait for TabSwitched instead of TabSwitchDone, r=extension-reviewers,credential-management-reviewers,search-reviewers,fxview-reviewers,tabbrowser-reviewers,places-reviewers,urlbar-reviewers,profiles-reviewers,scunnane,jteow,robwu,mossop,dao,dimi. https://github.com/mozilla-firefox/firefox/commit/9786bbf2abd4 https://hg.mozilla.org/integration/autoland/rev/7406ff85a2b4 set the test.wait300msAfterTabSwitch pref to true in tests that failed on try, r=jmaher,necko-reviewers,webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,credential-management-reviewers,search-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,tabbrowser-reviewers,places-reviewers,dom-storage-reviewers,translations-reviewers,home-newtab-reviewers,urlbar-reviewers,firefox-ai-ml-reviewers,profiles-reviewers,alwu,janv,twisniewski,scunnane,kershaw,robwu,dimi,mconley,nsharpley,jteow,mossop. https://github.com/mozilla-firefox/firefox/commit/9bfafd9fcf51 https://hg.mozilla.org/integration/autoland/rev/8ac3e54795a2 set the test.wait300msAfterTabSwitch pref to true in chrome mochitests that failed on try, r=Gijs,extension-reviewers,robwu.
Regressions: 1970198
Regressions: 1970211
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 141 Branch
Regressions: 1970258
Regressions: 1970260
Regressions: 1970262
Regressions: 1970269
Regressions: 1970270
Regressions: 1970274
Regressions: 1970277
Regressions: 1970300
Depends on: 1970688
Regressions: 1952432
Regressions: 1970717
Regressions: 1970722
Regressions: 1970731
Regressions: 1914007
Regressions: 1846627
Regressions: 1970733
Regressions: 1970735
Regressions: 1970761
Regressions: 1970783
Regressions: 1970794
Regressions: 1970982
No longer regressions: 1970982
Regressions: 1970982
Regressions: 1972094
Regressions: 1972397
No longer regressions: 1972397
Depends on: 1972594
Depends on: 1972597
QA Whiteboard: [qa-triage-done-c142/b141]
See Also: → 1977993
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: