Closed
Bug 603820
Opened 14 years ago
Closed 13 years ago
Use registerCleanupFunction in our tests
Categories
(Firefox Graveyard :: Panorama, defect, P3)
Firefox Graveyard
Panorama
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: iangilman, Unassigned)
Details
As noted in bug 603530, our test failures wouldn't cascade if we use registerCleanupFunction. We should update our existing tests to use this function. From https://developer.mozilla.org/en/Browser_chrome_tests : If you need to do special clean up after running your test, you can register a cleanup function that is guaranteed to be run after your test finishes. You can call registerCleanupFunction() at any point in your test, even in head.js if you need to register a clean up function for all tests in that folder. Notice that you can register as many clean up functions as you will. Clean up functions are also guaranteed to be called if your test timeouts, so you can ensure that in case of timeouts you won't pollute next running tests and causing them to fail. registerCleanupFunction(function() { // Clean up test related stuff here. }); function test() { // Add some test related stuff. }
Comment 1•14 years ago
|
||
bugspam
Comment 2•14 years ago
|
||
We are using registerCleanupFunction in our new tests. What should we do with this bug now? Shall we check all tests and add registerCleanupFunction to them?
Comment 3•14 years ago
|
||
(In reply to comment #2) > What should we do with this bug now? Shall we check all tests and add > registerCleanupFunction to them? I think we should have a look at all our older tests and add registerCleanupFunction() only where it seems important - like new windows and prefs, private browsing, etc.
Comment 6•13 years ago
|
||
bugspam (Fx7 was branched, removing open bugs from Fx7 meta bug, we won't create new meta bugs for upcoming Fx versions)
No longer blocks: 660175
Comment 7•13 years ago
|
||
Marking this as fixed because most of our tests do now use registerCleanupFunction(), newly written tests have to use it where appropriate and we haven't had cascading failures for quite a while.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•9 years ago
|
Product: Firefox → Firefox Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•