browser_connection_bug1445991.js (1047B)
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 await SpecialPowers.pushPrefEnv({ 11 set: [ 12 ["network.proxy.type", 2], 13 ["network.proxy.autoconfig_url", "file:///nonexistent.pac"], 14 ], 15 }); 16 17 await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true }); 18 const connectionURL = 19 "chrome://browser/content/preferences/dialogs/connection.xhtml"; 20 const promiseDialogLoaded = promiseLoadSubDialog(connectionURL); 21 gBrowser.contentDocument.getElementById("connectionSettings").click(); 22 const dialog = await promiseDialogLoaded; 23 24 ok( 25 !dialog.document.getElementById("autoReload").disabled, 26 "Reload button is enabled when proxy type is autoconfig" 27 ); 28 29 dialog.close(); 30 gBrowser.removeCurrentTab(); 31 });