Open Bug 1917140 Opened 11 months ago Updated 10 months ago

New wpt failures in /css/css-page/basic-pagination-002-print.html

Categories

(Core :: Layout, defect)

defect

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

Details

(Whiteboard: [wpt])

Syncing wpt PR 47986 found new untriaged test failures in CI

Tests Affected

New Tests That Don't Pass

CI Results

Gecko CI (Treeherder)
GitHub PR Head

Notes

These updates will be on mozilla-central once bug 1917041 lands.

Note: this bug is for tracking fixing the issues and is not
owned by the wpt sync bot.

This bug is linked to the relevant tests by an annotation in
https://github.com/web-platform-tests/wpt-metadata. These annotations
can be edited using the wpt interop dashboard
https://jgraham.github.io/wptdash/

If this bug is split into multiple bugs, please also update the
annotations, otherwise we are unable to track which wpt issues are
already triaged. Resolving as duplicate or closing this issue should
be cause the bot to automatically update or remove the annotation.

James, I can't see how the test is failing in neither wpt.fyi or Gecko CI, which makes it quite hard to triage... Do you know what's going on?

Flags: needinfo?(james)

Locally I see

0:11.09 TEST_END: FAIL, expected PASS - Testing http://web-platform.test:8000/css/css-page/basic-pagination-002-print.html == http://web-platform.test:8000/css/css-page/basic-pagination-002-print-ref.html
Got different numbers of pages; test has 4, ref has 2

It does seem like it's quite hard to convince the harness to dump the actual output in this case, however. A quick hack is something like:

diff --git a/remote/marionette/reftest.sys.mjs b/remote/marionette/reftest.sys.mjs
index 0affac65bd141..1d4ce87fe4143 100644
--- a/remote/marionette/reftest.sys.mjs
+++ b/remote/marionette/reftest.sys.mjs
@@ -807,6 +807,8 @@ browserRect.height: ${browserRect.height}`);
       printSettings
     );
 
+    console.log(binaryString);
+
     try {
       const pdf = await this.loadPdf(binaryString);
       let pages = this.getPages(pageRanges, url, pdf.numPages);

which will get you an escaped string for the PDF file.

Flags: needinfo?(james)

FWIW, if I just open https://wpt.live/css/css-page/basic-pagination-002-print.html in the browser and choose Print, the preview shows me two blank pages before the "expected" two pages with content, which matches the reported "Got different numbers of pages; test has 4, ref has 2" failure.

This is coming (I think) from the break-before: page value applied to <body> and <div>, resulting in two forced page breaks before the first bit of actual content. I guess the expectation is that break-before: page should not force a break if we're at the beginning of the document. Offhand I'm not sure if the spec is entirely clear about this...?

Severity: -- → S3
You need to log in before you can comment on or make changes to this bug.