зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1631452 part 4: Add more subtests for pages-per-sheet (for values 9 and 16). r=TYLin
These tests are modified copies of the previous patch's subtest for a 4-pages-per-sheet scenario. Differential Revision: https://phabricator.services.mozilla.com/D93298
This commit is contained in:
Родитель
6f1ff04a48
Коммит
4fdc0fb530
|
@ -33,6 +33,10 @@ support-files =
|
|||
printpreview_images_sw.js
|
||||
printpreview_pps4.html
|
||||
printpreview_pps4_ref.html
|
||||
printpreview_pps9.html
|
||||
printpreview_pps9_ref.html
|
||||
printpreview_pps16.html
|
||||
printpreview_pps16_ref.html
|
||||
printpreview_prettyprint.xml
|
||||
printpreview_prettyprint_ref.xhtml
|
||||
printpreview_mask.html
|
||||
|
|
|
@ -772,11 +772,22 @@ async function checkSupportedPagesPerSheetValue(src1, src2, numPages) {
|
|||
}
|
||||
// Pages-per-sheet: supported values (4, 9, 16)
|
||||
// And eventually 2 and 6, per bug 1669905.
|
||||
// (NOTE: tests for values 9 and 16 are coming in the next patch.)
|
||||
async function runTest31() {
|
||||
await checkSupportedPagesPerSheetValue("printpreview_pps4.html",
|
||||
"printpreview_pps4_ref.html", 4);
|
||||
|
||||
requestAnimationFrame(() => setTimeout(runTest32));
|
||||
}
|
||||
async function runTest32() {
|
||||
await checkSupportedPagesPerSheetValue("printpreview_pps9.html",
|
||||
"printpreview_pps9_ref.html", 9);
|
||||
|
||||
requestAnimationFrame(() => setTimeout(runTest33));
|
||||
}
|
||||
async function runTest33() {
|
||||
await checkSupportedPagesPerSheetValue("printpreview_pps16.html",
|
||||
"printpreview_pps16_ref.html", 16);
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- This is a testcase for a "16-pages-per-sheet" scenario.
|
||||
There are 16 full-page color-swatches. -->
|
||||
<style>
|
||||
html, body { margin: 0; height: 100%; }
|
||||
.swatch {
|
||||
box-sizing: border-box;
|
||||
border: 120px solid;
|
||||
height: 100%;
|
||||
}
|
||||
.swatch:nth-child(1) { border-color: cyan; }
|
||||
.swatch:nth-child(2) { border-color: yellow; }
|
||||
.swatch:nth-child(3) { border-color: pink; }
|
||||
.swatch:nth-child(4) { border-color: orange; }
|
||||
.swatch:nth-child(5) { border-color: purple; }
|
||||
.swatch:nth-child(6) { border-color: olive; }
|
||||
.swatch:nth-child(7) { border-color: blue; }
|
||||
.swatch:nth-child(8) { border-color: tan; }
|
||||
.swatch:nth-child(9) { border-color: fuchsia; }
|
||||
.swatch:nth-child(10) { border-color: salmon; }
|
||||
.swatch:nth-child(11) { border-color: lightgreen; }
|
||||
.swatch:nth-child(12) { border-color: navy; }
|
||||
.swatch:nth-child(13) { border-color: brown; }
|
||||
.swatch:nth-child(14) { border-color: orchid; }
|
||||
.swatch:nth-child(15) { border-color: goldenrod; }
|
||||
.swatch:nth-child(16) { border-color: seagreen; }
|
||||
</style>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- This is a reference case for a "16-pages-per-sheet" scenario. The width
|
||||
and height of each "swatch" is 1/4 the width and height of the page. -->
|
||||
<style>
|
||||
html, body { margin: 0; height: 100%; }
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
.swatch {
|
||||
box-sizing: border-box;
|
||||
border: 30px solid;
|
||||
/* The height will be automatically set to the flex container's row height,
|
||||
via default 'align-self' behavior (which ends up as 'stretch') */
|
||||
flex: 1 25%;
|
||||
}
|
||||
.swatch:nth-child(1) { border-color: cyan; }
|
||||
.swatch:nth-child(2) { border-color: yellow; }
|
||||
.swatch:nth-child(3) { border-color: pink; }
|
||||
.swatch:nth-child(4) { border-color: orange; }
|
||||
.swatch:nth-child(5) { border-color: purple; }
|
||||
.swatch:nth-child(6) { border-color: olive; }
|
||||
.swatch:nth-child(7) { border-color: blue; }
|
||||
.swatch:nth-child(8) { border-color: tan; }
|
||||
.swatch:nth-child(9) { border-color: fuchsia; }
|
||||
.swatch:nth-child(10) { border-color: salmon; }
|
||||
.swatch:nth-child(11) { border-color: lightgreen; }
|
||||
.swatch:nth-child(12) { border-color: navy; }
|
||||
.swatch:nth-child(13) { border-color: brown; }
|
||||
.swatch:nth-child(14) { border-color: orchid; }
|
||||
.swatch:nth-child(15) { border-color: goldenrod; }
|
||||
.swatch:nth-child(16) { border-color: seagreen; }
|
||||
</style>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- This is a testcase for a "9-pages-per-sheet" scenario.
|
||||
There are 9 full-page color-swatches. -->
|
||||
<style>
|
||||
html, body { margin: 0; height: 100%; }
|
||||
.swatch {
|
||||
box-sizing: border-box;
|
||||
border: 120px solid;
|
||||
height: 100%;
|
||||
}
|
||||
.swatch:nth-child(1) { border-color: cyan; }
|
||||
.swatch:nth-child(2) { border-color: yellow; }
|
||||
.swatch:nth-child(3) { border-color: pink; }
|
||||
.swatch:nth-child(4) { border-color: orange; }
|
||||
.swatch:nth-child(5) { border-color: purple; }
|
||||
.swatch:nth-child(6) { border-color: olive; }
|
||||
.swatch:nth-child(7) { border-color: blue; }
|
||||
.swatch:nth-child(8) { border-color: tan; }
|
||||
.swatch:nth-child(9) { border-color: fuchsia; }
|
||||
</style>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- This is a reference case for a "9-pages-per-sheet" scenario. The width
|
||||
and height of each "swatch" is 1/3 the width and height of the page. -->
|
||||
<style>
|
||||
html, body { margin: 0; height: 100%; }
|
||||
body {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
}
|
||||
.swatch {
|
||||
box-sizing: border-box;
|
||||
border: 40px solid;
|
||||
/* The height will be automatically set to the flex container's row height,
|
||||
via default 'align-self' behavior (which ends up as 'stretch') */
|
||||
/* Note: it's OK that the flex-basis isn't exactly 1/3 here.
|
||||
Flexbox layout will give each flex item 33% of the width,
|
||||
and then divide up the remaining amount equally. This
|
||||
results in exactly 3 items fitting per row and each one
|
||||
getting 1/3 of a row, which is all we're going for. */
|
||||
flex: 1 33%;
|
||||
}
|
||||
.swatch:nth-child(1) { border-color: cyan; }
|
||||
.swatch:nth-child(2) { border-color: yellow; }
|
||||
.swatch:nth-child(3) { border-color: pink; }
|
||||
.swatch:nth-child(4) { border-color: orange; }
|
||||
.swatch:nth-child(5) { border-color: purple; }
|
||||
.swatch:nth-child(6) { border-color: olive; }
|
||||
.swatch:nth-child(7) { border-color: blue; }
|
||||
.swatch:nth-child(8) { border-color: tan; }
|
||||
.swatch:nth-child(9) { border-color: fuchsia; }
|
||||
</style>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
||||
<div class="swatch"></div>
|
Загрузка…
Ссылка в новой задаче