Closed Bug 866641 Opened 12 years ago Closed 12 years ago

Port registerCleanupFunction() method from mochitest browser-chrome to mochitest plain

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla23

People

(Reporter: whimboo, Assigned: ted)

References

()

Details

Attachments

(1 file)

The registerCleanupFunction method for Mochitest browser is very helpful if specific tasks have to be run before the test is finished. Mochitest plain is missing this feature and makes it hard to do the right cleanup logic for heavy asynchronous tests. It would be fantastic if we can get the method and related code ported over to mochitest plain.
Summary: Port registerCleanupFunction() method from mochitest chrome to mochitest plain → Port registerCleanupFunction() method from mochitest browser-chrome to mochitest plain
This does the trick.
Attachment #743185 - Flags: review?(jmaher)
Assignee: nobody → ted
Blocks: 815002
Comment on attachment 743185 [details] [diff] [review] add registerCleanupFunction method to mochitest-plain Review of attachment 743185 [details] [diff] [review]: ----------------------------------------------------------------- I would like to see a test case that adds 2 cleanup functions. The rest looks pretty safe.
Attachment #743185 - Flags: review?(jmaher) → review+
I made the sanity test set two prefs and use two separate cleanup functions to unset them, and check both of them in test_sanity_cleanup2: https://hg.mozilla.org/integration/mozilla-inbound/rev/e13bb42d2872
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: