mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-07 05:15:09 +00:00
Bug 706280 - Intermittent failure in browser/components/places/tests/chrome/test_bug549192.xul | Exited with code 1 during test run.
r=felipe a=tests-only
This commit is contained in:
parent
38cab04af0
commit
87dfc08a7a
@ -144,11 +144,7 @@ function endTest() {
|
||||
.getMostRecentWindow("Download:Manager")
|
||||
.close();
|
||||
|
||||
Cc["@mozilla.org/browser/nav-history-service;1"]
|
||||
.getService(Ci.nsINavHistoryService)
|
||||
.removeAllPages();
|
||||
|
||||
SimpleTest.finish();
|
||||
waitForClearHistory(SimpleTest.finish);
|
||||
}
|
||||
|
||||
]]>
|
||||
|
@ -168,3 +168,16 @@ function setCleanState()
|
||||
let win = getDMWindow();
|
||||
if (win) win.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears history invoking callback when done.
|
||||
*/
|
||||
function waitForClearHistory(aCallback) {
|
||||
Components.utils.import("resource://gre/modules/PlacesUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.obs.addObserver(function observeClearHistory(aSubject, aTopic) {
|
||||
Services.obs.removeObserver(observeClearHistory, aTopic);
|
||||
aCallback();
|
||||
}, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
|
||||
PlacesUtils.bhistory.removeAllPages();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user