Show Firefox UI when using loadBrowserWindow() in tests
The window created by loadWindow() is still empty, but this removes the 'chrome' flag for loadBrowserWindow(), which causes the Firefox UI to be shown. I think openDialog calls are always chrome, but providing just the chrome flag disables all other options (e.g., navbar).
This commit is contained in:
parent
7975835b5e
commit
c18f31aeab
1 changed files with 7 additions and 2 deletions
|
@ -13,7 +13,9 @@ function waitForDOMEvent(target, event, capture) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Open a window. Returns a promise for the window.
|
||||
* Open a chrome window and return a promise for the window
|
||||
*
|
||||
* @return {Promise<ChromeWindow>}
|
||||
*/
|
||||
function loadWindow(winurl, argument) {
|
||||
var win = window.openDialog(winurl, "_blank", "chrome", argument);
|
||||
|
@ -28,7 +30,10 @@ function loadWindow(winurl, argument) {
|
|||
* @return {Promise<ChromeWindow>}
|
||||
*/
|
||||
function loadBrowserWindow() {
|
||||
return loadWindow("chrome://browser/content/browser.xul");
|
||||
var win = window.openDialog("chrome://browser/content/browser.xul");
|
||||
return waitForDOMEvent(win, "load").then(function() {
|
||||
return win;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue