Fix and re-enable test_history_expiration.js

This commit is contained in:
Marco Bonardo 2010-06-17 21:46:22 +02:00
parent f6afa68e4d
commit 82fb454a43
3 changed files with 2 additions and 8 deletions

View File

@ -41,10 +41,6 @@
function run_test()
{
// Temporarily disabled till I figure out what's up.
// mak.
return;
// Like the code, we check to see if nav-history-service exists
// (i.e MOZ_PLACES is enabled), so that we don't run this test if it doesn't.
if (!("@mozilla.org/browser/nav-history-service;1" in Cc))

View File

@ -220,7 +220,7 @@ const EXPIRATION_QUERIES = {
+ "UNION ALL "
+ "SELECT v.id, IFNULL(h_t.url, h.url) AS url, "
+ "v.visit_date AS visit_date, "
+ ":limit_uris AS expected_results "
+ ":limit_visits AS expected_results "
+ "FROM moz_historyvisits v "
+ "LEFT JOIN moz_places_temp AS h_t ON h_t.id = v.place_id "
+ "LEFT JOIN moz_places AS h ON h.id = v.place_id "
@ -549,7 +549,7 @@ nsPlacesExpiration.prototype = {
}
}
else if (aTopic == TOPIC_DEBUG_START_EXPIRATION) {
this._debugLimit = aData;
this._debugLimit = aData || -1; // Don't limit if unspecified.
this._expireWithActionAndLimit(ACTION.DEBUG, LIMIT.DEBUG);
}
else if (aTopic == TOPIC_IDLE_BEGIN) {

View File

@ -74,8 +74,6 @@ function force_expiration_start() {
* Forces an expiration run.
*/
function force_expiration_step(aLimit) {
if (!aLimit)
aLimit = -1; // No limit.
const TOPIC_DEBUG_START_EXPIRATION = "places-debug-start-expiration";
let expire = Cc["@mozilla.org/places/expiration;1"].getService(Ci.nsIObserver);
expire.observe(null, TOPIC_DEBUG_START_EXPIRATION, aLimit);