Bug 1062894 - Fix wrong assumption in test-places-events.js. r=mossop

This commit is contained in:
Marco Bonardo 2015-05-08 12:43:17 +02:00
parent ebf6e4ba5f
commit ef679c4a51
2 changed files with 8 additions and 4 deletions

View File

@ -143,6 +143,11 @@ function createBookmark (data) {
}
exports.createBookmark = createBookmark;
function historyBatch () {
hsrv.runInBatchMode(() => {}, null);
}
exports.historyBatch = historyBatch;
function createBookmarkItem (data) {
let deferred = defer();
data = data || {};

View File

@ -29,7 +29,7 @@ const { search } = require('sdk/places/history');
const {
invalidResolve, invalidReject, createTree, createBookmark,
compareWithHost, addVisits, resetPlaces, createBookmarkItem,
removeVisits
removeVisits, historyBatch
} = require('./places-helper');
const { save, MENU, UNSORTED } = require('sdk/places/bookmarks');
const { promisedEmitter } = require('sdk/places/utils');
@ -236,9 +236,8 @@ exports['test history-start-batch, history-end-batch, history-start-clear'] = fu
on(startEvent, 'data', startHandler);
on(clearEvent, 'data', clearHandler);
createBookmark().then(() => {
resetPlaces(complete);
})
historyBatch();
resetPlaces(complete);
};
exports['test history-visit, history-title-changed'] = function (assert, done) {