tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_invalid_defaultLocation.js (677B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * https://creativecommons.org/publicdomain/zero/1.0/ */
      3 "use strict";
      4 
      5 /**
      6 * Test that if browser.bookmarks.defaultLocation contains an invalid GUID,
      7 * PlacesUIUtils.defaultParentGuid will return a proper default value.
      8 */
      9 
     10 add_task(async function () {
     11  Services.prefs.setCharPref(
     12    "browser.bookmarks.defaultLocation",
     13    "useOtherBookmarks"
     14  );
     15 
     16  info(
     17    "Checking that default parent guid was set back to the toolbar because of invalid preferable guid"
     18  );
     19  Assert.equal(
     20    await PlacesUIUtils.defaultParentGuid,
     21    PlacesUtils.bookmarks.toolbarGuid,
     22    "Default parent guid is a toolbar guid"
     23  );
     24 });