Bug 1342320 - Use PlacesUtils and not PlacesSyncUtils in sync bookmark decline/undecline test r?markh draft
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Tue, 14 Mar 2017 13:01:10 -0400
changeset 499527 36d080cea1fd0a40c187ecfd1343655996155bae
parent 498376 8afe7f683eaa6e449c2399e994e78932f20d5e0a
child 549381 11d4dad662a56083dead6421fdf29d41262dff75
push id49440
push userbmo:tchiovoloni@mozilla.com
push dateWed, 15 Mar 2017 22:34:18 +0000
reviewersmarkh
bugs1342320
milestone55.0a1
Bug 1342320 - Use PlacesUtils and not PlacesSyncUtils in sync bookmark decline/undecline test r?markh 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();