You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit db556f3
Browse filesBrowse the repository at this point in the historyBrowse files
test: run the printer equivalence suite against Gecko in CI (#22155)
* test(equivalence): keep a condition apart on the features nothing samples
Follow-up to #22151.
`unsampledBy` treated every feature whose name ends in a viewport dimension as
one the viewport bits already tell apart, so `device-width`, `device-height` and
`device-aspect-ratio` — the screen's, which `setViewport` does not move — were
dropped from the text and from the bits both, and two conditions naming
different ones read as one. The media type is now read outside the parentheses
as well, so a feature's own words cannot be taken for a type.
A filed color rewrite is held exactly, the way every other filed set in the file
is: a `FILED_COLOR_REWRITES` entry the engine stopped moving now fails rather
than sitting there. It is counted before the within-a-byte tolerance so the
tolerance cannot hide it, and the enumerated-fold comparison sorts both sides.
Two JSDoc blocks had come apart from what they document: `installHelpers` had
gained a second block instead of the `@param`, and `roundedOnly`'s had been left
above `withinAByte`.
`launchBrowser` and `install-firefox` read `PUPPETEER_CACHE_DIR` and build the
path with `path.join`, so they agree on where the browser went; a caller's own
`executablePath` is no longer overwritten, a platform puppeteer cannot detect
reports no browser rather than throwing, and a failed install prints its error
and exits non-zero. `TESTING_DOCS.md` still pointed at the deleted
`launchChrome.js`.
* ci: run the printer equivalence suite against Gecko as well
`syntax-equivalence-firefox` runs the same corpus and the same assertions under
`EQUIVALENCE_BROWSER=firefox`, beside the Chrome job rather than replacing it —
a rewrite only one engine reads differently is invisible to a suite that asks
one, and five of the defects filed today are ones only Gecko sees. It is a job
of its own so the existing check keeps its name, installs the browser with
`yarn setup:firefox`, and uploads no coverage: the Chrome job already reports
this suite's lines under the `syntax-equivalence` flag.
`unsampledBy` counted a feature once per occurrence, so `(monochrome) and
(monochrome)` and the `(monochrome)` the printer folds it to read as two
conditions where the viewport bits agreed. `and`, `or` and `,` are idempotent,
so the parts are a set — its own documentation already said "named once".
* ci: name the engine on both equivalence jobs
The Chrome run was `syntax-equivalence` with nothing saying which browser it
asked, while the engine added beside it said `-firefox` — so the pair read as a
suite and an afterthought rather than as one suite over two engines. They are
one matrix now, `syntax-equivalence (chrome)` and `syntax-equivalence
(firefox)`, the shape `runtimes (bun)` and `runtimes (deno)` already use here.
That also removes the copy of the job the second engine had brought with it:
the corpus checkout, the three caches and both comparison installs were
duplicated. Firefox is installed on its own row, Chrome reports the coverage
(both cover the same lines, so a second uploader only leaves the report short),
and `fail-fast: false` keeps one engine's failure from cancelling the other.
* ci: name the equivalence rows for the engine alone
A matrix row carries the script and the coverage flag beside the browser, and
the generated name prints every key — so the checks read `syntax-equivalence
(chrome, cover:syntax-equivalence, true)`. An explicit `name` keeps the engine
and drops the rest.
* test: ask WebKit the same questions as Blink and Gecko
WebKit is the third engine and the one Safari ships, and puppeteer reaches
Chrome and Firefox only — so `EQUIVALENCE_BROWSER=webkit` drives it through
playwright, under a shim in `launchBrowser.js` presenting the nine calls the
suites make. Playwright takes one argument where puppeteer takes several, and
offers no `color-gamut`, so it declines media emulation outright and a
condition carries what no viewport varies as text, the way Gecko already does.
`forEngine` no longer assumes two engines: a reason opening `<engine> only:` is
kept where it names the engine being run and dropped everywhere else, so a
third filed set needs nothing further.
The row is `continue-on-error` until its filed set is written from what it
actually sees. Both other engines opened with hundreds of differences that were
nearly all the harness rather than the printer, and the same is expected here;
filing them before the first run would be inventing them.
* test: file what WebKit sees and hold it like the other two engines
The first WebKit run reported 24 differences over 5803 checks, and they are
five causes. Each is filed with what was measured, so the row blocks like
Chrome's and Firefox's rather than reporting past a CI flag.
Three are the harness meeting a third engine. WebKit reads a different
`document.compatMode` for the two forms of eleven files and the reverse for
two, which a direction that flips per file says is how the document is built
rather than what the printer wrote. It lays out in sixty-fourths of a pixel,
so `112px` reads back as `111.984375px` in five framework stylesheets. And it
serializes a computed number to six significant digits where Blink keeps more
— which is the printer's own cap, so the whole-element comparison now reads
both sides at that precision, Chromium excepted since the fixtures were
measured against it.
Two are the engine: no `fetchpriority` reflection, so `high` and `low` both
read `auto`; no CSS Painting API, so a `paint()` image is dropped; and
`shape-image-threshold` read as the number its percentage means.
`attribute-tables` and `minimize-values` are filed by two engines for
different causes now, so a reason may name more than one.
|`yarn test:syntax-equivalence`| Holds the HTML/CSS printers to what Chrome makes of their output, over `configCases` and `test/wpt`.|
38
+
|`yarn test:syntax-equivalence`| Holds the HTML/CSS printers to a real browser's reading of their output, over `configCases` and `test/wpt`. |
39
39
|`yarn test:base -u`| Update snapshots (eyeball the diff first). |
40
40
|`yarn test:size`| Size of the generated code over all `configCases/` (per asset, plus runtime module counts per runtime). |
41
41
|`yarn cover:unit`| Unit-test coverage. |
@@ -109,12 +109,12 @@ The directory listings below are the canonical map of the repository. **Whenever
109
109
110
110
**Git submodules** — the spec-conformance corpora are submodules, checked out on demand: `yarn setup` does not fetch them, and each CI job fetches only the submodules it needs, one commit deep.
0 commit comments