Bug 1395784 - Skip browser_controller_onDrop.js when async places transactions are turned off. r?mak draft
authorMark Banner <standard8@mozilla.com>
Mon, 04 Sep 2017 11:23:07 +0100
changeset 658531 1662ab1ddf0c
parent 658358 8e05298328da
child 729694 7667d2897a38
push id77811
push userbmo:standard8@mozilla.com
push dateMon, 04 Sep 2017 10:30:03 +0000
reviewersmak
bugs1395784
milestone57.0a1
Bug 1395784 - Skip browser_controller_onDrop.js when async places transactions are turned off. r?mak MozReview-Commit-ID: FFJLRIvOfZX
browser/components/places/tests/browser/browser_controller_onDrop.js
--- a/browser/components/places/tests/browser/browser_controller_onDrop.js
+++ b/browser/components/places/tests/browser/browser_controller_onDrop.js
@@ -41,16 +41,21 @@ add_task(async function setup() {
     bookmarks[0].guid,
     bookmarks[1].guid,
     bookmarks[2].guid,
   ]);
 });
 
 async function run_drag_test(startBookmarkIndex, insertionIndex,
                              realInsertionIndex, expectTransactionCreated = true) {
+  if (!PlacesUIUtils.useAsyncTransactions) {
+    Assert.ok(true, "Skipping test as async transactions are turned off");
+    return;
+  }
+
   // Reset the stubs so that previous test runs don't count against us.
   PlacesUIUtils.getTransactionForData.reset();
   PlacesTransactions.batch.reset();
 
   let dragBookmark = bookmarks[startBookmarkIndex];
 
   await withSidebarTree("bookmarks", async (tree) => {
     tree.selectItems([PlacesUtils.unfiledBookmarksFolderId]);