playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Bug]: Firefox not in dark mode with `Cross-Origin-Opener-Policy` header set

Open greyhillman opened this issue 1 year ago • 0 comments

Version

1.49.0

Steps to reproduce

  1. Clone repo: https://github.com/greyhillman/playwright-firefox-dark-bug
  2. npm install
  3. npm run test

Expected behavior

Test should pass. Firefox should still be in dark mode when taking the screenshot of the page.

Actual behavior

Test fails. Firefox is in light mode when taking the screenshot of the page.

Additional context

  • When testing in Chrome and Mobile Chrome, the page is in dark mode when taking the screenshot.
  • Comments in the test files should also help.

There is a workaround in workaround.spec.ts, which is to simply navigate to the page and then emulateMedia.

Environment

System:
    OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (16) x64 AMD Ryzen 7 2700 Eight-Core Processor
    Memory: 9.77 GB / 15.54 GB
    Container: Yes
  Binaries:
    Node: 18.19.1 - /usr/bin/node
    npm: 9.2.0 - /usr/bin/npm
  Languages:
    Bash: 5.2.21 - /usr/bin/bash
  npmPackages:
    @playwright/test: ^1.49.0 => 1.49.0

greyhillman avatar Dec 05 '24 01:12 greyhillman