Use OpenBrowserWindow() instead of window.open() to open new browser windows in marionette

RESOLVED FIXED in Firefox 65

Status

enhancement
RESOLVED FIXED
8 months ago
6 months ago

People

(Reporter: Gijs, Assigned: Gijs)

Tracking

Version 3
mozilla65
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

This should be a straightforward swap, in theory.
Somehow I can never get this name right.
Summary: Use BrowserOpenWindow() instead of window.open() to open new browser windows in marionette → Use OpenBrowserWindow() instead of window.open() to open new browser windows in marionette
Thanks Gijs! So this is only needed when opening a new browser window? Or do we also have to change `window.open()` for other shipped and/or custom chrome windows as what we use through our Marionette unit tests like in test_window_handles_chrome.py?
Attachment #9024675 - Attachment description: Bug 1506796 - use OpenBrowserWindow instead of window.open() to create a browser window, r?whimboo → Bug 1506797 - use OpenBrowserWindow instead of window.open() to create a browser window, r?whimboo
Attachment #9024675 - Attachment description: Bug 1506797 - use OpenBrowserWindow instead of window.open() to create a browser window, r?whimboo → Bug 1506796 - use OpenBrowserWindow instead of window.open() to create a browser window, r?whimboo
(In reply to Henrik Skupin (:whimboo) from comment #4)
> Thanks Gijs! So this is only needed when opening a new browser window? Or do
> we also have to change `window.open()` for other shipped and/or custom
> chrome windows as what we use through our Marionette unit tests like in
> test_window_handles_chrome.py?

Yeah, this needed updating throughout. As a bonus though, this patch now fixes bug 1335457. Green try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=de2a17e1f61853fc202ba76fbd8bf9050a09b7df&searchStr=marionette
Blocks: 1335457
(In reply to :Gijs (he/him) from comment #5)
> Yeah, this needed updating throughout. As a bonus though, this patch now
> fixes bug 1335457. Green try:

Fantastic! 

I just noticed that also Firefox puppeteer for Marionette uses `window.open()` for a new chrome window:
https://dxr.mozilla.org/mozilla-central/source/testing/marionette/puppeteer/firefox/firefox_puppeteer/ui/windows.py#353

I wonder why this doesn't cause a failure given that there are some tests like:
https://dxr.mozilla.org/mozilla-central/source/testing/firefox-ui/tests/puppeteer/test_windows.py#112
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6293789f6e9c
use OpenBrowserWindow instead of window.open() to create a browser window, r=whimboo
https://hg.mozilla.org/mozilla-central/rev/6293789f6e9c
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.