File tree Expand file tree Collapse file tree 2 files changed +4
-17
lines changed
browser/components/enterprisepolicies Expand file tree Collapse file tree 2 files changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -3177,8 +3177,6 @@ export function runOnce(actionName, callback) {
31773177 * A promise that will resolve once the callback finishes running.
31783178 */
31793179async function runOncePerModification ( actionName , policyValue , callback ) {
3180- // Stringify the value so that it matches what we'd get from getStringPref.
3181- policyValue = policyValue + "" ;
31823180 let prefName = `browser.policies.runOncePerModification.${ actionName } ` ;
31833181 let oldPolicyValue = Services . prefs . getStringPref ( prefName , undefined ) ;
31843182 if ( policyValue === oldPolicyValue ) {
Original file line number Diff line number Diff line change @@ -28,22 +28,11 @@ add_task(async function test_menu_shown_string() {
2828
2929 // Since testing will apply the policy after the browser has already started,
3030 // we will need to open a new window to actually see the menu bar
31- {
32- let newWin = await BrowserTestUtils . openNewBrowserWindow ( ) ;
33- let menubar = newWin . document . getElementById ( "toolbar-menubar" ) ;
34- ok ( ! menubar . hasAttribute ( "autohide" ) , "The menu bar should not be hidden" ) ;
35- setToolbarVisibility ( menubar , false ) ;
36- ok ( menubar . hasAttribute ( "autohide" ) , "The menu bar should be hidden" ) ;
37- await BrowserTestUtils . closeWindow ( newWin ) ;
38- }
31+ let newWin = await BrowserTestUtils . openNewBrowserWindow ( ) ;
32+ let menubar = newWin . document . getElementById ( "toolbar-menubar" ) ;
33+ ok ( ! menubar . hasAttribute ( "autohide" ) , "The menu bar should not be hidden" ) ;
3934
40- {
41- // Make sure the menubar autohide persists even tho it's default-on.
42- let newWin = await BrowserTestUtils . openNewBrowserWindow ( ) ;
43- let menubar = newWin . document . getElementById ( "toolbar-menubar" ) ;
44- ok ( menubar . hasAttribute ( "autohide" ) , "The menu bar should be hidden" ) ;
45- await BrowserTestUtils . closeWindow ( newWin ) ;
46- }
35+ await BrowserTestUtils . closeWindow ( newWin ) ;
4736} ) ;
4837
4938add_task ( async function test_menubar_on ( ) {
You can’t perform that action at this time.
0 commit comments