Skip to content

[testdriver] Expose BiDi browsingContext.setViewport to regular WPT tests#59265

Draft
Minju-kim-igalia wants to merge 4 commits intoweb-platform-tests:masterfrom
Minju-kim-igalia:bidi-set-viewport-dpr-tests
Draft

[testdriver] Expose BiDi browsingContext.setViewport to regular WPT tests#59265
Minju-kim-igalia wants to merge 4 commits intoweb-platform-tests:masterfrom
Minju-kim-igalia:bidi-set-viewport-dpr-tests

Conversation

@Minju-kim-igalia
Copy link
Copy Markdown
Contributor

@Minju-kim-igalia Minju-kim-igalia commented Apr 16, 2026

This change exposes the existing BiDi browsingContext.setViewport command to regular WPT tests through testdriver.js?feature=bidi. It adds a thin test_driver.bidi.browsing_context.set_viewport(...) wrapper and the corresponding wptrunner plumbing so testharness-based tests can set a viewport and/or devicePixelRatio override from the page.

This patch also adds a small DPR-focused WPT under css/cssom-view/ that verifies:

  • window.devicePixelRatio reflects the override
  • resolution media queries reflect the override

Testing: ./wpt run chrome css/cssom-view/devicepixelratio-override-bidi.https.html

…ests

This change exposes the existing BiDi `browsingContext.setViewport` command
to regular WPT tests through `testdriver.js?feature=bidi`.
It adds a thin `test_driver.bidi.browsing_context.set_viewport(...)` wrapper
and the corresponding wptrunner plumbing so testharness-based tests can
set a viewport and/or `devicePixelRatio` override from the page.

This patch also adds a small DPR-focused WPT under `css/cssom-view/` that verifies:
- `window.devicePixelRatio` reflects the override
- `resolution` media queries reflect the override

Testing:`./wpt run chrome css/cssom-view/devicepixelratio-override-bidi.https.html

- Ref web-platform-tests#12725
- Chromium: https://issues.chromium.org/issues/489737943
@Minju-kim-igalia Minju-kim-igalia marked this pull request as draft April 16, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cssom-view infra testdriver.js wg-s_css wptrunner The automated test runner, commonly called through ./wpt run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants