Repository navigation
Should the test suite also run on Firefox? #373
Replies: 3 comments 7 replies
I'm not opposed to some testing diversity, but is Firefox the best choice, given it's declining usage and precarious finances? Is the OPFS problem with Webkit because Playwright runs it in private mode by default, and if so do we know whether that is painful to override? |
|
Thanks, I'm up for it. Before I start, here are a few choices that are yours to make rather than mine. Each one comes with what I'd do by default. 1. Which Chromium. CI runs Chrome 129 today, through
Also, is 129 a deliberate pin (for JSPI, perhaps), or just the version that was current when you last bumped it? 2. Restricting to one browser. I'd read a comma-separated list from an environment variable, for example 3. CI layout. Each CI run tests twice today: once with the checked-in WASM, then again after 4. Tests that cannot pass as written without
5. The harness turning a failure into a hang. When
I'd register the cleanup before the open and make 6. WebKit bug 324094. Until Playwright ships a WebKit with the fix (1.64, not released yet), 7. One PR or two. I'd send a single PR, with the test and harness changes in their own commits ahead of the config and workflow changes. Would you prefer them split? |
|
A follow-up before I open the PR: while setting up the three browsers I measured a few more things on my fork's Actions, and they changed my proposal. I'd rather run it by you first. Test what users actually run. The point of running the suite in browsers is to know that wa-sqlite works where it will be used, so the browsers should be the ones users run. Anything else is noise: a failure that no user will ever hit, or a pass that says nothing about a real browser. Playwright's Firefox and WebKit are patched builds, and its WebKit on Linux is not Safari. The suite runs fine on stock browsers through WebDriver, with
So I'd drop Playwright entirely, including your point 1 (its bundled Chromium). During development, In CI, one reusable workflow holds the steps, and each platform gets a small workflow of its own: Linux (Chrome, Firefox), Windows (Chrome, Firefox), macOS (Chrome, Firefox, Safari).
Tests that fail because of the browser, and what I'd do:
Everything else passes on every platform; each case above was measured, and I can share the runs. The same design also leaves room for mobile browsers:
Does this direction work for you? |
Uh oh!
There was an error while loading. Please reload this page.
While working on #372 I ran the whole suite on Firefox too (Firefox 153 through Playwright 1.62.1), and I wonder whether CI should do the same.
Why Firefox. It takes paths Chromium never does. Without
readwrite-unsafeaccess handles ('mode' in FileSystemSyncAccessHandle.prototypeis false there, as on Safari),OPFSAdaptiveVFSandOPFSWriteAheadVFSkeep exclusive handles, and several recent fixes were Firefox-only or much worse there:VACUUMfailed withdisk I/O erroron Firefox only;Firefox supports JSPI now, so all three builds run. And Playwright's WebKit on Linux has no OPFS, so Firefox is the practical way to cover the no-
readwrite-unsafeside in CI.What it would take. Everything passes on Firefox except two things, both on
master, both in the tests rather than in a VFS:OPFSWriteAheadVFS's multi-connection tests (vfs_read_freshness, andsql_0005insql.test.js) open a second connection, which fails on Firefox withunable to open database file: withoutreadwrite-unsafe, the VFS keeps its handles for the connection's life. They would need a skip wherereadwrite-unsafeis missing.vfs_read_freshnessis mine (OPFSWriteAheadVFS: read the WAL to its end when a read transaction begins #365), so that assumption is on me.sql_0005failure then hangssql.test.js. The worker whose open failed is never destroyed (its cleanup is registered after the open), so it keeps its session directory open. The nextcontext.create()withresetcannot empty OPFS,maybeResetgives up after 10 s without posting anything, andTestContext.create()waits forever. Jasmine runs in random order, so it only hangs when a resetting spec runs after that failure. Registering the destroy before the open, and havingcreate()reject when the worker fails during setup, would turn the hang into an ordinary failure.Plus the launcher itself:
@web/test-runner-playwrightwith Firefox in the config, and Playwright's Firefox installed in the workflow.If that sounds worthwhile, I'd be glad to send it as a PR: the launcher, the skip, and the two harness fixes. And if Chromium-only is a deliberate choice, no problem at all.
All reactions