Bug 1258127 - Improve bookmarks engine test logging and remove a deprecated call. r=kitcambridge draft
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 27 Apr 2016 15:17:05 -0700
changeset 370547 9e8cabe6532405ccfa17464aa11fba49d04f8a9c
parent 368993 7b3ca5c5381c9df61729197263115eaf69ea98ce
child 370548 55362aba1bb2e627a97bbf046d2baa4061446165
push id19095
push userkcambridge@mozilla.com
push dateTue, 24 May 2016 23:04:33 +0000
reviewerskitcambridge
bugs1258127
milestone49.0a1
Bug 1258127 - Improve bookmarks engine test logging and remove a deprecated call. r=kitcambridge MozReview-Commit-ID: GEs6pYYnt7x
services/sync/tests/unit/test_bookmark_engine.js
--- a/services/sync/tests/unit/test_bookmark_engine.js
+++ b/services/sync/tests/unit/test_bookmark_engine.js
@@ -7,16 +7,18 @@ Cu.import("resource://services-common/as
 Cu.import("resource://gre/modules/Log.jsm");
 Cu.import("resource://services-sync/engines.js");
 Cu.import("resource://services-sync/engines/bookmarks.js");
 Cu.import("resource://services-sync/service.js");
 Cu.import("resource://services-sync/util.js");
 Cu.import("resource://testing-common/services/sync/utils.js");
 Cu.import("resource://gre/modules/Promise.jsm");
 
+initTestLogging("Trace");
+
 Service.engineManager.register(BookmarksEngine);
 
 add_test(function bad_record_allIDs() {
   let server = new SyncServer();
   server.start();
   let syncTesting = new SyncTestingInfrastructure(server.server);
 
   _("Ensure that bad Places queries don't cause an error in getAllIDs.");
@@ -199,18 +201,17 @@ add_task(function* test_restorePromptsRe
       .getService(Ci.nsIProperties);
 
     let backupFile = dirSvc.get("TmpD", Ci.nsILocalFile);
 
     _("Make a backup.");
     backupFile.append("t_b_e_" + Date.now() + ".json");
 
     _("Backing up to file " + backupFile.path);
-    backupFile.create(Ci.nsILocalFile.NORMAL_FILE_TYPE, 0o600);
-    yield BookmarkJSONUtils.exportToFile(backupFile);
+    yield BookmarkJSONUtils.exportToFile(backupFile.path);
 
     _("Create a different record and sync.");
     let bmk2_id = PlacesUtils.bookmarks.insertBookmark(
       folder1_id, tburi, PlacesUtils.bookmarks.DEFAULT_INDEX, "Get Thunderbird!");
     let bmk2_guid = store.GUIDForId(bmk2_id);
     _("Get Thunderbird!: " + bmk2_id + ", " + bmk2_guid);
 
     PlacesUtils.bookmarks.removeItem(bmk1_id);