diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /testing/web-platform/tests/docs/writing-tests/print-reftests.md | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/docs/writing-tests/print-reftests.md')
-rw-r--r-- | testing/web-platform/tests/docs/writing-tests/print-reftests.md | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/testing/web-platform/tests/docs/writing-tests/print-reftests.md b/testing/web-platform/tests/docs/writing-tests/print-reftests.md new file mode 100644 index 0000000000..62a037da12 --- /dev/null +++ b/testing/web-platform/tests/docs/writing-tests/print-reftests.md @@ -0,0 +1,45 @@ +# Print Reftests + +Print reftests are like ordinary [reftests](reftests), except that the +output is rendered to pagninated form and then compared page-by-page +with the reference. + +Print reftests are distinguished by the string `-print` in the +filename immediately before the extension, or by being under a +directory named `print`. Examples: + +- `css/css-foo/bar-print.html` is a print reftest +- `css/css-foo/print/bar.html` is a print reftest +- `css/css-foo/bar-print-001.html` is **not** a print reftest + + +Like ordinary reftests, the reference is specified using a `<link +rel=match>` element. + +The default page size for print reftests is 12.7 cm by 7.62 cm (5 +inches by 3 inches). + +All the features of ordinary reftests also work with print reftests +including [fuzzy matching](reftests.html#fuzzy-matching). Any fuzzy +specifier applies to each image comparison performed i.e. separately +for each page. + +## Page Ranges + +In some cases it may be desirable to only compare a subset of the +output pages in the reftest. This is possible using +``` +<meta name=reftest-pages content=[range-specifier]> +``` +Where a range specifier has the form +``` +range-specifier = <specifier-item> ["," <specifier-item>]* +specifier-item = <int> | <int>? "-" <int>? +``` + +For example to specify rendering pages 1 and 2, 4, 6 and 7, and 9 and +10 of a 10 page page document one could write: + +``` +<meta name=reftest-pages content="-2,4,6,7,9-"> +``` |