feat(browserContext): support maximized viewport - #42286
Devin Rousso (dcrousso) wants to merge 1 commit into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
50daf77 to
90c3fcf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
90c3fcf to
58ec01c
Compare
This comment has been minimized.
This comment has been minimized.
🟢 CI is clear — the one failure is a pre-existing Windows flakeHi, I'm the Playwright bot and I took a look at the failing CI on this PR. The single red test — DetailsThis PR adds a Pre-existing flake / infra
The other 22 tests in the report are within-run flakes (rescued on retry), so there's nothing to triage there. Triaged by the Playwright bot - agent run |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
58ec01c to
95d42b0
Compare
windowState option
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| await context.close(); | ||
| }); | ||
|
|
||
| it('should keep native window maximized when resizing viewport', async ({ browser, browserName }) => { |
There was a problem hiding this comment.
What does this mean for the user? How does it look?
There was a problem hiding this comment.
page.setViewportSize() sets a fixed inner viewport without resizing the maximized native window leaving unused space around the 567x345 page
There was a problem hiding this comment.
This sounds very strange to me. I'd assume that setViewportSize() completely disregards the viewportSize option from the context settings. It does so for WxH values, and for null values, so it should do the same for maximized?
| await context.close(); | ||
| }); | ||
|
|
||
| it('should open popups in maximized windows', async ({ browser, browserName, server }) => { |
There was a problem hiding this comment.
I'd like to also understand the expected behavior of things like "shift+click" that opens a new window, or window.open('', '_blank', 'left=100,top=100,width=320,height=320').
There was a problem hiding this comment.
maximizing should override popup geometry for shift-click and explicitly sized window.open()
i've added tests for both
95d42b0 to
d86a51d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
allow `viewport: 'maximized'` to maximize native browser windows without a default emulated viewport keep native maximization independent of browser fullscreen and the web Fullscreen API preserve the maximized outer window when `Page.setViewportSize()` enables viewport emulation
d86a51d to
e9e95e1
Compare
Test results for "tests 1"4 flaky51521 passed, 1286 skipped Merge workflow run. |
Test results for "MCP"3 failed 8345 passed, 1376 skipped Merge workflow run. |
🟢 CI is clear — every failure is a pre-existing flakeHi, I'm the Playwright bot and I took a look at the failing CI on this PR. All three red tests are MCP flakes that fail on unrelated PRs and on DetailsThe Pre-existing flake / infra
This PR changes Triaged by the Playwright bot - agent run |
allow
viewport: 'maximized'to maximize native browser windows without a default emulated viewportkeep native maximization independent of browser fullscreen and the web Fullscreen API
preserve the maximized outer window when
Page.setViewportSize()enables viewport emulationfixes #1086