зеркало из https://github.com/mozilla/pjs.git
Bug 489078 - (TUnit) xpcshell-tests test_getTypeFromExtension_with_empty_Content_Type.js leaks; r=sdwilsh
This commit is contained in:
Родитель
4c9b41cd5a
Коммит
3b70af52ff
|
@ -81,8 +81,12 @@ var HandlerServiceTest = {
|
|||
init: function HandlerServiceTest_init() {
|
||||
// Register ourselves as a directory provider for the datasource file
|
||||
// if there isn't one registered already.
|
||||
try { this._dirSvc.get("UMimTyp", Ci.nsIFile) }
|
||||
catch (ex) { this._dirSvc.registerProvider(this) }
|
||||
try {
|
||||
this._dirSvc.get("UMimTyp", Ci.nsIFile);
|
||||
} catch (ex) {
|
||||
this._dirSvc.registerProvider(this);
|
||||
this._providerRegistered = true;
|
||||
}
|
||||
|
||||
// Delete the existing datasource file, if any, so we start from scratch.
|
||||
// We also do this after finishing the tests, so there shouldn't be an old
|
||||
|
@ -99,6 +103,9 @@ var HandlerServiceTest = {
|
|||
// Delete the existing datasource file, if any, so we don't leave test files
|
||||
// lying around and we start from scratch the next time.
|
||||
this._deleteDatasourceFile();
|
||||
// Unregister the directory service provider
|
||||
if (this._providerRegistered)
|
||||
this._dirSvc.unregisterProvider(this);
|
||||
},
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче