Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Bug 885052 - Fullscreen-button is checked during customization mode i…
…f the browser is in fullscreen. r=Unfocused
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
browser/components/customizableui/test/browser_885052_customize_mode_observers_disabed.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
"use strict"; | ||
|
||
// Observers should be disabled when in customization mode. | ||
add_task(function() { | ||
BrowserFullScreen(); | ||
let shownPanelPromise = promisePanelShown(window); | ||
PanelUI.toggle({type: "command"}); | ||
yield shownPanelPromise; | ||
|
||
let fullscreenButton = document.getElementById("fullscreen-button"); | ||
ok(fullscreenButton.checked, "Fullscreen button should be checked when in fullscreen.") | ||
|
||
yield startCustomizing(); | ||
|
||
let fullscreenButtonWrapper = document.getElementById("wrapper-fullscreen-button"); | ||
ok(fullscreenButtonWrapper.hasAttribute("itemobserves"), "Observer should be moved to wrapper"); | ||
fullscreenButton = document.getElementById("fullscreen-button"); | ||
ok(!fullscreenButton.hasAttribute("observes"), "Observer should be removed from button"); | ||
ok(!fullscreenButton.checked, "Fullscreen button should no longer be checked during customization mode"); | ||
|
||
yield endCustomizing(); | ||
BrowserFullScreen(); | ||
shownPanelPromise = promisePanelShown(window); | ||
PanelUI.toggle({type: "command"}); | ||
yield shownPanelPromise; | ||
|
||
fullscreenButton = document.getElementById("fullscreen-button"); | ||
ok(!fullscreenButton.checked, "Fullscreen button should not be checked when not in fullscreen.") | ||
|
||
let hiddenPanelPromise = promisePanelHidden(window); | ||
PanelUI.toggle({type: "command"}); | ||
yield hiddenPanelPromise; | ||
}); |