tor-browser

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

browser_connection_bug1505330.js (1114B)


      1 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      2 /* Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/publicdomain/zero/1.0/ */
      4 
      5 "use strict";
      6 
      7 // Test the disabled status of the autoconfig Reload button when the proxy type
      8 // is autoconfig (network.proxy.type == 2).
      9 add_task(async function testAutoconfigReloadButton() {
     10  Services.prefs.lockPref("signon.autologin.proxy");
     11 
     12  await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
     13  const connectionURL =
     14    "chrome://browser/content/preferences/dialogs/connection.xhtml";
     15  const promiseDialogLoaded = promiseLoadSubDialog(connectionURL);
     16  gBrowser.contentDocument.getElementById("connectionSettings").click();
     17  const dialog = await promiseDialogLoaded;
     18 
     19  ok(
     20    !dialog.document.getElementById("networkProxyType").firstChild.disabled,
     21    "Connection options should not be disabled"
     22  );
     23  ok(
     24    dialog.document.getElementById("autologinProxy").disabled,
     25    "Proxy autologin should be disabled"
     26  );
     27 
     28  dialog.close();
     29  Services.prefs.unlockPref("signon.autologin.proxy");
     30  gBrowser.removeCurrentTab();
     31 });