Closed Bug 1850535 Opened 1 year ago Closed 1 year ago

implement registerTaskCleanup() hook

Categories

(Toolkit :: Password Manager, task)

task

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: joschmidt, Assigned: joschmidt)

References

Details

(Whiteboard: [fxcm-test-debt])

Attachments

(3 files, 1 obsolete file)

Extend the add_task helper to emit a signal when a task has ended so other helpers can hook into it to do some after task cleanup.

Assignee: nobody → joschmidt

Helpers and tests can now hook into SimpleTest.registerTaskCleanupFunction to
provide a code that will be executed after the current task is finished. In it,
for example, state can be cleaned up.

Switch a sample test to use storeLoginsDuringTask(...loginInfos) and
SimpleTest.setContentForTask(html), which are powered by task cleanup fn.

Depends on D187211

Attachment #9351063 - Attachment description: WIP - Bug 1850535 - mochitest task cleanup function support - r?#credential-management-reviewers! → Bug 1850535 - mochitest task cleanup function support - r?#credential-management-reviewers!
Attachment #9351200 - Attachment description: WIP: - Bug 1850535 - mochitest task cleanup function example usage - r?#credential-management-reviewers! → Bug 1850535 - mochitest task cleanup function example usage - r?#credential-management-reviewers!

Rewrite test_autocomplete_autofill_related_realms_no_dupes.html and introduce

  • SimpleTest.setPreferencesForTask(...preferences)
  • storeLoginsDuringTest(...loginInfos)
  • formAutofillResult(formId)

which handles state cleanup between tests and tasks.

Depends on D187271

Attachment #9351546 - Attachment description: WIP: - Bug 1850535 - mochitest task cleanup function example usage - r?#credential-management-reviewers! → Bug 1850535 - mochitest task cleanup function example usage - r?#credential-management-reviewers!
Attachment #9351546 - Attachment description: Bug 1850535 - mochitest task cleanup function example usage - r?#credential-management-reviewers! → Bug 1850535 - mochitest task cleanup function based formAutofillResult and setPreferencesForTask and their use - r?#credential-management-reviewers!

Depends on D187435

Pushed by joschmidt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/480dbe152462 mochitest task cleanup function support - r=credential-management-reviewers,sgalich,jmaher https://hg.mozilla.org/integration/autoland/rev/b01839e48205 mochitest task cleanup function example usage - r=credential-management-reviewers,dimi https://hg.mozilla.org/integration/autoland/rev/fc9333c3b9f7 mochitest task cleanup function based formAutofillResult and setPreferencesForTask and their use - r=credential-management-reviewers,sgalich,dimi
Attachment #9352554 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: