Backed out changeset 3ae77edf8ed2 (bug 1310941) for frequent intermittent xpcshell failure in test_bookmark_engine.js. r=backout

This commit is contained in:
Sebastian Hengst 2016-10-18 21:45:09 +02:00
Родитель bacfbe04f5
Коммит 9f8d517918
2 изменённых файлов: 6 добавлений и 34 удалений

Просмотреть файл

@ -1110,8 +1110,7 @@ BookmarksTracker.prototype = {
// *each change*.
onItemChanged: function BMT_onItemChanged(itemId, property, isAnno, value,
lastModified, itemType, parentId,
guid, parentGuid, oldValue,
source) {
guid, parentGuid, source) {
if (IGNORED_SOURCES.includes(source)) {
return;
}

Просмотреть файл

@ -5,7 +5,6 @@ Cu.import("resource://gre/modules/PlacesUtils.jsm");
Cu.import("resource://gre/modules/PlacesSyncUtils.jsm");
Cu.import("resource://gre/modules/BookmarkJSONUtils.jsm");
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://services-sync/engines.js");
Cu.import("resource://services-sync/engines/bookmarks.js");
Cu.import("resource://services-sync/service.js");
@ -20,20 +19,13 @@ Service.engineManager.register(BookmarksEngine);
add_task(function* test_change_during_sync() {
_("Ensure that we track changes made during a sync.");
let engine = new BookmarksEngine(Service);
let store = engine._store;
let tracker = engine._tracker;
let engine = new BookmarksEngine(Service);
let store = engine._store;
let server = serverForFoo(engine);
new SyncTestingInfrastructure(server.server);
let collection = server.user("foo").collection("bookmarks");
let bz_id = PlacesUtils.bookmarks.insertBookmark(
PlacesUtils.bookmarksMenuFolderId, Utils.makeURI("https://bugzilla.mozilla.org/"),
PlacesUtils.bookmarks.DEFAULT_INDEX, "Bugzilla");
let bz_guid = yield PlacesUtils.promiseItemGuid(bz_id);
_(`Bugzilla GUID: ${bz_guid}`);
Svc.Obs.notify("weave:engine:start-tracking");
try {
@ -53,17 +45,6 @@ add_task(function* test_change_during_sync() {
let bmk2_guid = "get-firefox1";
let bmk3_id = -1;
{
// An existing record changed on the server that should not trigger
// another sync when applied.
let changedRecord = new Bookmark("bookmarks", bz_guid);
changedRecord.bmkUri = "https://bugzilla.mozilla.org/";
changedRecord.description = "New description";
changedRecord.title = "Bugzilla";
changedRecord.tags = ["new", "tags"];
changedRecord.parentName = "Bookmarks Toolbar";
changedRecord.parentid = PlacesUtils.bookmarks.toolbarGuid;
collection.insert(bz_guid, encryptPayload(changedRecord.cleartext));
let localRecord = new Bookmark("bookmarks", bmk2_guid);
localRecord.bmkUri = "http://getfirefox.com/";
localRecord.description = "Firefox is awesome.";
@ -92,12 +73,7 @@ add_task(function* test_change_during_sync() {
}
_("Perform first sync");
{
let changes = engine.pullNewChanges();
deepEqual(changes.ids().sort(), [folder1_guid, bmk1_guid, "toolbar"],
"Should track bookmark and folder created before first sync");
yield sync_engine_and_validate_telem(engine, false);
}
yield sync_engine_and_validate_telem(engine, false);
let bmk2_id = store.idForGUID(bmk2_guid);
let bmk3_guid = store.GUIDForId(bmk3_id);
@ -117,12 +93,9 @@ add_task(function* test_change_during_sync() {
}
_("Perform second sync");
{
let changes = engine.pullNewChanges();
deepEqual(changes.ids().sort(), [bmk3_guid, folder1_guid].sort(),
"Should track bookmark added during last sync and its parent");
yield sync_engine_and_validate_telem(engine, false);
yield sync_engine_and_validate_telem(engine, false);
{
ok(collection.wbo(bmk3_guid),
"Bookmark created during first sync should be uploaded during second sync");