mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1729795 - Clean up openNewWindowWithFlushedXULCacheForMozSupports. r=jaws,extension-reviewers,zombie
The only test that still needs it is browser_tab_manager_visibility.js. The rest look like proton leftovers. After bug 1729477 those sheets are stored in the shared style sheet cache, not in the XUL prototype cache, so remove that. Differential Revision: https://phabricator.services.mozilla.com/D124983
This commit is contained in:
parent
ba00bd23b7
commit
0fc9c3ee58
@ -28,7 +28,7 @@ function openAboutPrefPromise(win) {
|
||||
return Promise.all(promises);
|
||||
}
|
||||
add_task(async function setup() {
|
||||
let win = await BrowserTestUtils.openNewWindowWithFlushedXULCacheForMozSupports();
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
// Open a new tab to keep the window open.
|
||||
await BrowserTestUtils.openNewForegroundTab(
|
||||
win.gBrowser,
|
||||
|
@ -4,7 +4,7 @@
|
||||
"use strict";
|
||||
|
||||
add_task(async function test_pip_label_changes_tab() {
|
||||
let newWin = await BrowserTestUtils.openNewWindowWithFlushedXULCacheForMozSupports();
|
||||
let newWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
|
||||
let pipTab = newWin.document.querySelector(".tabbrowser-tab[selected]");
|
||||
pipTab.setAttribute("pictureinpicture", true);
|
||||
|
@ -11,7 +11,7 @@ const DUMMY_PAGE_PATH = "/browser/base/content/test/tabs/dummy_page.html";
|
||||
add_task(async function tab_manager_visibility_preference_on() {
|
||||
Services.prefs.setBoolPref("browser.tabs.tabmanager.enabled", true);
|
||||
|
||||
let newWindow = await BrowserTestUtils.openNewWindowWithFlushedXULCacheForMozSupports();
|
||||
let newWindow = await BrowserTestUtils.openNewWindowWithFlushedCacheForMozSupports();
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{
|
||||
gBrowser: newWindow.gBrowser,
|
||||
@ -33,7 +33,7 @@ add_task(async function tab_manager_visibility_preference_on() {
|
||||
add_task(async function tab_manager_visibility_preference_off() {
|
||||
Services.prefs.setBoolPref("browser.tabs.tabmanager.enabled", false);
|
||||
|
||||
let newWindow = await BrowserTestUtils.openNewWindowWithFlushedXULCacheForMozSupports();
|
||||
let newWindow = await BrowserTestUtils.openNewWindowWithFlushedCacheForMozSupports();
|
||||
await BrowserTestUtils.withNewTab(
|
||||
{
|
||||
gBrowser: newWindow.gBrowser,
|
||||
|
@ -1028,19 +1028,15 @@ var BrowserTestUtils = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Flush the XUL cache and open a new window to ensure
|
||||
* Clear the stylesheet cache and open a new window to ensure
|
||||
* CSS @supports -moz-bool-pref(...) {} rules are correctly
|
||||
* applied to the browser chrome.
|
||||
*
|
||||
* @param {Object} options See BrowserTestUtils.openNewBrowserWindow
|
||||
* @returns {Promise} Resolves with the new window once it is loaded.
|
||||
*/
|
||||
async openNewWindowWithFlushedXULCacheForMozSupports(options) {
|
||||
async openNewWindowWithFlushedCacheForMozSupports(options) {
|
||||
ChromeUtils.clearStyleSheetCache();
|
||||
|
||||
Services.obs.notifyObservers(null, "chrome-flush-caches");
|
||||
await TestUtils.waitForTick();
|
||||
|
||||
return BrowserTestUtils.openNewBrowserWindow(options);
|
||||
},
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// the color of the tab line are applied properly.
|
||||
|
||||
add_task(async function test_support_tab_line() {
|
||||
let newWin = await BrowserTestUtils.openNewWindowWithFlushedXULCacheForMozSupports();
|
||||
let newWin = await BrowserTestUtils.openNewBrowserWindow();
|
||||
|
||||
const TAB_LINE_COLOR = "#ff0000";
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
|
@ -83,7 +83,7 @@ function getStars(notice) {
|
||||
}
|
||||
|
||||
add_task(async function setup() {
|
||||
let win = await BrowserTestUtils.openNewWindowWithFlushedXULCacheForMozSupports();
|
||||
let win = await BrowserTestUtils.openNewBrowserWindow();
|
||||
// Open a new tab to keep the window open.
|
||||
await BrowserTestUtils.openNewForegroundTab(
|
||||
win.gBrowser,
|
||||
|
Loading…
Reference in New Issue
Block a user