Closed
Bug 2092566
Opened 12 days ago
Closed 4 days ago
[meta] Fix the browser-chrome tests that fail when run twice in a row
Categories
(Testing :: Mochitest, task)
Testing
Mochitest
Tracking
(firefox163 fixed)
RESOLVED
FIXED
163 Branch
| Tracking | Status | |
|---|---|---|
| firefox163 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
(Depends on 1 open bug)
Details
(Keywords: meta)
Attachments
(1 external file)
Many browser-chrome tests fail when they run a second time in the same browser, because the first run leaves state behind (history, cookies, caches, prefs, widgets) or because the product does not reset its own state.
Skip-if annotations
browser_whats_new_page*.jsandbrowser_suppressTips.js, bug 2092091: startup tests that cannot run twice in one session. Two patches skip 4 tests in repeat mode, as is already done in verify mode.
Test fixes
browser_941083_invalidate_wrapper_cache_createWidget.js, bug 2091414: the widget id stayed ingSeenWidgets, sogetWidgetreturned null on run 2. The test now removes it.browser_toolbar_collapsed_states.js, bug 2091368: the test relied on a preloaded about:newtab browser that run 1 used up. It now waits for the toolbar to show.browser_custom_avatar_test.js, bug 2091370: the Glean avatar error event from run 1 was counted again. FOG is now reset before the check.browser_scriptCache_responseHeaders.js, bug 2091377: a leftover cookie made theVary: Cookieresponse cacheable on run 2. The test now removes the cookie.browser_staticPartition_network.js, bug 1883194: the Alt-Svc entries added by run 1 were still there on run 2. The test now clears the Alt-Svc cache at the end.browser_onvisit_title_null_for_navigation.js, bug 2091378: run 1 left the page in history, so no title change happened on run 2. History is now cleared around the test.browser_thumbnails_bg_no_cookies_sent.js, bug 2091986: thecolor=greencookie from run 1 turned the page green too early on run 2. The test now removes it.browser_protocol_ask_dialog_permission.js, bug 2022645: cleanup left themoz-test-wallethandler behind, so run 2 found two handlers. Cleanup now removes it.browser_981418-widget-onbeforecreated-handler.js, bug 2091988: the leaked panelview made run 2 wait on the stale view with the same id and time out. The test now removes it.browser_987177_destroyWidget_xul.js, bug 2092058: the XUL button stayed in the palette, so run 2 resolved the old button. The test now removes the button and destroys the widget.browser_993322_widget_notoolbar.js, bug 2092060: the destroyed widget stayed ingSeenWidgets, so run 2 could not place it. The test now forgets the id.browser_clientAuthRememberService.js,browser_clientAuth_connection.jsandbrowser_clientAuth.js, bug 2092065: remembered client-auth decisions and an added enterprise intermediate survived into run 2. Two patches clear the decisions, one actually removes the intermediate.browser_save_link-perwindowpb.js, bug 2092076: thefoopycookie from run 1 made the server set no cookie on run 2. The test now clears it.browser_stop_streams_on_indicator_close.js, bug 1775943: the test read the active streams before other tabs' processes had reported their removal. It now waits for webrtcUI to forget every stopped stream.browser_952963_areaType_getter_no_area.js, bug 2092082: resetting customization while the widget was registered left it ingSeenWidgets. The widget is now destroyed first.browser_vertical_tabs_default_area.js, bug 2068983: the four test widgets stayed ingSeenWidgetsand were never auto-placed on run 2. The test now forgets them.browser_uidensity_auto_compact.js, bug 2059750:sidebar.visibilitywas saved as expand-on-hover and restored on run 2, so compact never disengaged. The test now resets it before leaving vertical tabs.browser_chat_shortcuts.js, bug 2092259: the native click left the OS cursor over the selection menu, which hovered the copy button on Windows. The test now moves the cursor away.browser_installssl.js, bug 2091987: cached XPI downloads skipped the TLS errors on run 2. The test now clears the HTTP cache when removing the overrides.browser_bug1716290-1.jsand related charset tests, bug 2092068: the.sjsstate persisted, so run 2's first load got the post-detection response. The server state is now reset after the forced reload.browser_bug420605.jsandbrowser_bug503832.js, bug 2092071: visits from run 1 stayed in history and broke the not-in-history checks. Both now clear history.browser_Manifest_install.js, bug 2092283: the installed manifest survived, so run 2 saw it as already installed. The test now cleans it up.browser_bookmarks_toolbar_telemetry.js, bug 1935530: popping the pref bypassed the telemetry's toolbar state, so run 2 recorded the wrong transition. The test now restores visibility so the telemetry sees it.browser_test_favicon.js, bug 2092319: the cached no-store icon meant run 2 never processed its cookie. The test now clears the HTTP cache.browser_103_assets.js, bug 2092321:early_hint_asset.sjsserved the module empty, so the import raced the failed preload. It now serves a real JavaScript module.browser_necko_l10n.js, bug 2092322: the status panel could still show run 1's label when the test read it. The test now waits for the load's status to show.browser_last_window_close_trigger.js, bug 2091373: Glean counters kept run 1's values. The test now resets FOG before checking the bypass counter.browser_schemeless.js, bug 2091375: typed visits from earlier runs made the https origin outrank http. The test now clears history first.browser_switchToTab_fullUrl_repeatedKeydown.js, bug 2091989:browser_switchToTab_closes_newtab.jsleft a history result that outranked the switch-to-tab row. It now clears history after itself.browser_trust_panel_security_view.js, bug 2089807: the expired page was served from the HTTP cache on run 2, with no error page. The test now clears the cache afterwards.browser_force_refresh.js, bug 2021173:ForceRefreshParentkeptdoneset from run 1 and ignored every message. Its module state is now reset at the start of the test.browser_glean_telemetry_engagement_tips.js, bug 2024340: the cached l10n string was applied as text, dropping the learn-more link. The tip description is now marked as markup.browser_bookmark_drag_splitview.js, bug 2092272: nodragendfired, leaving the tab strip in moving-tab mode. The test now firesdragendat the dragged split view.browser_privatebrowsing_downloadLastDir.js, bug 2092273: the per-site content pref survived and pointed the picker at run 1's directory. Cleanup now clears it.browser_privatebrowsing_redesign_telemetry.js, bug 2092274: the exposure was already recorded, so run 2 timed out and left a private window open. The test now resets the exposure flag.browser_create_profile_page_test.js, bug 2092277: a leftoverquit-application-requestedobserver swallowed run 2's Delete click. The test now removes it.browser_UITour.js, bug 2092281:distribution.idand the profile reset time were not restored. The test now restores both.browser_glean_telemetry_engagement_selected_result.js, bug 2011291:updateTopSites()pushed a pref env that was never popped, leaving the wrong prefs set.doTest()now pops it.browser_userContextId_tag.js, bug 2057689: unclosed notifications stayed in the Windows Action Center and collided with run 2's. The test now closes them, and its mock alerts service forwards the close.browser_aboutthirdparty.js, bug 2092294: the DLL had two load events on run 2, which the test did not expect. It now accounts for a repeated run in the same session.browser_privbrowsing_perwindowpb.js, bug 2092296: the form history entry from run 1 broke the private-window count. The test now removes it.browser_star_hsts.js, bug 2092310: the edit-bookmark panel saved the bookmark only when cleanup closed it, so run 2 started already starred. The test now waits for the save first.browser_download_spam_protection.js, bug 1775779: the test's own click could make all 100 downloads count as user-activated. It no longer clicks the spammy page.browser_forgetThisSite.js, bug 2092317: the IndexedDB database from run 1 meant run 2 never got an upgrade result. The test now clears the databases it creates.browser_relay_utils.js, bug 1995881: FirefoxRelay kept the stubbed allow-list cached, so run 2 still offered Relay. The tests now reset its cached lists when they finish.browser_browserGlue_fxa_client_info_ping.js, bug 2092549:browser.is_user_defaultis recorded once per session, so run 2 found no value. The test now runs the startup default browser check itself.
Product fixes
browser_placeholder.js, bug 2092326: the New Tab search bar kept a wrong placeholder after akeyword.enabledchange during init. The placeholder is now updated once the engine store has initialized.browser_check_identity_state.js, bug 2092324: the untrusted modules ping dropped a promise that rejects when the staging backup is empty.UntrustedModulesPingnow handles the rejection.browser_edit_profile_test.js, bug 2091464: the browser-chrome harness replaced the tab between tests without resetting focus, leaving a stale keyboard-focused tab. It now focuses the selected browser first.browser_protections_telemetry.js, bug 1870751:AboutProtectionsParentkept the lastentrypointin a module global. It is now reset once the report has recorded it.browser_popup_mouseover.js, bug 2092327: the autocomplete popup'smousedOverIndexkept its old value after hiding. It is now reset when the popup hides.browser_thumbnails_bg_basic.js, bug 2092328: run 2 failed on the existing thumbnail because the no-overwrite error was never recognized. One patch keeps theDOMExceptionname throughPromiseWorker, the other ignores IOUtils' existing-file error.browser_registerArea.js, bugs 2092544 and 2092543:unregisterArealeft the area's wrapper cached, so run 2's lookup threw. One patch drops the cached wrapper when unregistering, the other stops the lookup at the document element.browser_proxyAuth_prompt.js, bug 1883561: a pending auth prompt was removed from a different bucket than it was added to, so the stale one leaked into run 2. It is now removed from the bucket it was added to.browser_captivePortal_certErrorUI.js, bug 1972348:CaptivePortalWatcherkept its recheck observer when its window closed.uninit()now removes it.browser_fullscreen-window-open.js, bug 987115: nothing told chrome code when a macOS native fullscreen transition ended, so run 2 raced it. The widget now notifies at the end and the test waits for it.browser_visituri_restriction_origin.js, bug 2022665: clearing history left each process's cached visited state, so run 2's link came up visited. Clearing history now marks links unvisited in all processes.browser_visited_status_after_history_clear.js, bug 2092552: clearing history keptmRecentlyVisitedURIs, so reloading the page right after wasn't recorded. It is now forgotten when history is cleared.browser_urlQueryStrippingListService.js, bug 2092555: unregistering an observer while its registration was still waiting for init did nothing.URLQueryStrippingListServicenow handles that case.
| Assignee | ||
Comment 1•12 days ago
|
||
Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.
Pushed by fqueze@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/cda97eb50c8e
https://hg.mozilla.org/integration/autoland/rev/0e2636c3effd
Run mochitest-browser-chrome-repeat on autoland and mozilla-central, r=taskgraph-reviewers,ahal,Mardak.
Comment 3•4 days ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 4 days ago
status-firefox163:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•