browser_aboutdebugging_debug-target-pane_collapsibilities_preference.js (1091B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 /* import-globals-from helper-collapsibilities.js */ 7 Services.scriptloader.loadSubScript( 8 CHROME_URL_ROOT + "helper-collapsibilities.js", 9 this 10 ); 11 12 /** 13 * Test for preference of DebugTargetPane collapsibilities. 14 */ 15 16 add_task(async function () { 17 prepareCollapsibilitiesTest(); 18 19 const { document, tab, window } = await openAboutDebugging(); 20 await selectThisFirefoxPage(document, window.AboutDebugging.store); 21 22 info("Collapse all pane"); 23 for (const { title } of TARGET_PANES) { 24 const debugTargetPaneEl = getDebugTargetPane(title, document); 25 await toggleCollapsibility(debugTargetPaneEl); 26 } 27 28 info("Check preference of collapsibility after closing about:debugging page"); 29 await removeTab(tab); 30 // Wait until unmount. 31 await waitUntil(() => document.querySelector(".app") === null); 32 33 for (const { pref } of TARGET_PANES) { 34 is( 35 Services.prefs.getBoolPref(pref), 36 true, 37 `${pref} preference should be true` 38 ); 39 } 40 });