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 376886 a10dc1ea8c9c7b84e6ff7ad3b0f7d62368097eda
parent 376885 fbfd5cdc74f6c1075cf9e72065cdc203480a6a92
child 376887 36c50c1294eb958da00dba111dd02e151539763a
push id7074
push userryanvm@gmail.com
push dateWed, 22 Mar 2017 03:15:25 +0000
treeherdermozilla-beta@b36ed364ed82 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh, test-only
bugs1342320
milestone53.0
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();