Bug 1342320 - Use PlacesUtils and not PlacesSyncUtils in sync bookmark decline/undecline test. r=markh, a=test-only
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Tue, 14 Mar 2017 13:01:10 -0400
changeset 395301 aa03407e251b883e9034796feb2301b9fb68af6e
parent 395300 cb5a19a8c01cf2d1bfab5d4531cb0d37e05b5ee3
child 395302 308f9472bb0c82445a497bc17a6ff006be5fe6d4
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, test-only
bugs1342320
milestone54.0a2
Bug 1342320 - Use PlacesUtils and not PlacesSyncUtils in sync bookmark decline/undecline test. r=markh, a=test-only MozReview-Commit-ID: DgbCeKgSxoE
services/sync/tests/unit/test_bookmark_decline_undecline.js
--- a/services/sync/tests/unit/test_bookmark_decline_undecline.js
+++ b/services/sync/tests/unit/test_bookmark_decline_undecline.js
@@ -65,23 +65,21 @@ function getBookmarkWBO(server, guid) {
 }
 
 add_task(async function test_decline_undecline() {
   let engine = Service.engineManager.get("bookmarks");
   let server = serverForFoo(engine);
   await SyncTestingInfrastructure(server);
 
   try {
-    let bzGuid = "999999999999";
-    await PlacesSyncUtils.bookmarks.insert({
-      kind: PlacesSyncUtils.bookmarks.KINDS.BOOKMARK,
-      syncId: bzGuid,
-      parentSyncId: "menu",
+    let { guid: bzGuid } = await PlacesUtils.bookmarks.insert({
+      parentGuid: PlacesUtils.bookmarks.menuGuid,
       url: "https://bugzilla.mozilla.org",
-
+      index: PlacesUtils.bookmarks.DEFAULT_INDEX,
+      title: "bugzilla",
     });
 
     ok(!getBookmarkWBO(server, bzGuid), "Shouldn't have been uploaded yet");
     Service.sync();
     ok(getBookmarkWBO(server, bzGuid), "Should be present on server");
 
     engine.enabled = false;
     Service.sync();