tor-browser

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

test_status_checkSetup.js (752B)


      1 /* Any copyright is dedicated to the Public Domain.
      2 * http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 const { Status } = ChromeUtils.importESModule(
      5  "resource://services-sync/status.sys.mjs"
      6 );
      7 
      8 add_task(async function test_status_checkSetup() {
      9  try {
     10    _("Fresh setup, we're not configured.");
     11    Assert.equal(Status.checkSetup(), CLIENT_NOT_CONFIGURED);
     12    Assert.equal(Status.login, LOGIN_FAILED_NO_USERNAME);
     13    Status.resetSync();
     14 
     15    _("Let's provide the syncKeyBundle");
     16    await configureIdentity();
     17 
     18    _("checkSetup()");
     19    Assert.equal(Status.checkSetup(), STATUS_OK);
     20    Status.resetSync();
     21  } finally {
     22    for (const pref of Svc.PrefBranch.getChildList("")) {
     23      Svc.PrefBranch.clearUserPref(pref);
     24    }
     25  }
     26 });