It is now* possible to write reftests for print layout in wpt. These work like normal reftests except instead of comparing the rendering of two documents in a browser window, they compare all the pages of a paginated rendering of the documents.

wpt print reftests go through the full printing machinery, generating a PDF, so they exercise parts of the code that aren't covered by paginated reftests in the reftest harness (at some cost to performance).

Documentation for writing print reftests is at [1]

The tests are currently supported in Firefox and Chrome, but not yet in WebKit, pending support for automated PDF generation.

Please let me know if you have questions or concerns.

Thanks to hiro for all the help and feedback, and bdahl for help with pdf.js. Also to the wider wpt community, notably including Google's Ecosystem-Infra team and gsnedders, who gave feedback on the design document and did most of the code review for upstream changes.

[1] http://web-platform-tests.org/writing-tests/print-reftests.html

* As of a month or two ago; I should have written this email sooner :)
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to