Closed Bug 2092575 Opened 12 days ago Closed 4 days ago

[meta] Fix the mochitest-chrome tests that fail when run twice in a row

Categories

(Testing :: Mochitest, task)

task

Tracking

(firefox163 fixed)

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

(Keywords: meta)

Attachments

(1 external file)

Running mochitest-chrome twice in a row exposed tests that fail the second time because the first run left state behind, and one product bug that a leftover pointer position made visible. This stack fixes them.

Test fixes

  • test_reporturl.html (bug 2092557): clicking "ignore the risk" left a session-long safe-browsing permission that made the repeat run report an https URL. The test now removes the permission.
  • test_moz_reorderable_list.html (bug 2092558): scrollIntoView() also scrolled the harness body, pushing the test frame off-screen on the next run. The test now scrolls only its own document.
  • test_MozDomFullscreen_event.xhtml (bug 2092559): on macOS, closing the window right after MozDOMFullscreen:Exited made the next run's native fullscreen request fail. The test now uses emulated fullscreen.
  • test_bug1266815.html (bug 2092560): the mock helper app dialog factory left its contract ID mapped to an unregistered CID, so the second run threw at load. The contract is now mapped back to the original CID.
  • test_bug549682.xhtml (bug 2092561): the delayed global frame script was never removed, so the second run loaded it twice and counted extra messages. The test now removes it.
  • test_clonewrapper.xhtml (bug 1870534): the second run's frames reused the first run's document.domain-flagged compartments and got transparent wrappers. The first run now removes its frames, waits for their destruction and runs a GC.
  • test_moz_toggle.html (bug 2092565): the test clicked a 0x0 description on the label's corner, so the result depended on sub-pixel offsets. The toggle now has a real description to click.

Product fixes

  • test_panel_item_first_letter.html (bug 2092569, bug 2092570): the previous test left the pointer over "More", so the reloaded panel opened its submenu, and a letter typed while the submenu was still aligning was dropped by both lists. The test moves the pointer away, and panel-list now keeps those letters.
  • test_classifier_changetablepref.html (bug 2092571): a re-registered table stayed in the old update URL's needs-update set, so run 1's update timer blocked run 2's update. The list manager now forgets the previous update URL.

Like the standalone variant: on backstop pushes, on Linux and Windows only, to
spare the mac pool.

Depends on: 2095817
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/eef79782af03 https://hg.mozilla.org/integration/autoland/rev/d2343e8b7153 Run mochitest-chrome-repeat-1proc on autoland and mozilla-central, r=taskgraph-reviewers,ahal.
Status: ASSIGNED → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: