browser_touchbar_customization.js (960B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 // Checks if the Customize Touch Bar button appears when a Touch Bar is 8 // initialized. 9 add_task(async function customizeTouchBarButtonAppears() { 10 let updater = Cc["@mozilla.org/widget/touchbarupdater;1"].getService( 11 Ci.nsITouchBarUpdater 12 ); 13 // This value will be reset to its default the next time a window is opened. 14 updater.setTouchBarInitialized(true); 15 await startCustomizing(); 16 let touchbarButton = document.querySelector("#customization-touchbar-button"); 17 ok(!touchbarButton.hidden, "Customize Touch Bar button is not hidden."); 18 let touchbarSpacer = document.querySelector("#customization-touchbar-spacer"); 19 ok(!touchbarSpacer.hidden, "Customize Touch Bar spacer is not hidden."); 20 await endCustomizing(); 21 });