зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1717703 Part 2 - Add test for printing with down-scaled page-size. r=dholbert
This test couldn't succeed without the fix for the clipping issue. Differential Revision: https://phabricator.services.mozilla.com/D119460
This commit is contained in:
Родитель
2844167a17
Коммит
6e2a97de80
|
@ -58,6 +58,8 @@ support-files =
|
|||
print_page_size2_ref.html
|
||||
print_page_size3.html
|
||||
print_page_size3_ref.html
|
||||
print_page_size4.html
|
||||
print_page_size4_ref.html
|
||||
color_adjust.html
|
||||
color_adjust_ref.html
|
||||
test_document_adopted_styles.html
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
@page {
|
||||
size: 10in;
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
background: blue;
|
||||
width: 1in;
|
||||
height: 1in;
|
||||
}
|
||||
.upper {
|
||||
top: 0;
|
||||
}
|
||||
.lower{
|
||||
bottom: 0;
|
||||
}
|
||||
.left{
|
||||
left: 0;
|
||||
}
|
||||
.right{
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="upper left"></div>
|
||||
<div class="upper right"></div>
|
||||
<div class="lower left"></div>
|
||||
<div class="lower right"></div>
|
||||
</body>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<style>
|
||||
@page {
|
||||
size: 20in;
|
||||
margin: 0;
|
||||
}
|
||||
div {
|
||||
position: absolute;
|
||||
background: blue;
|
||||
width: 2in;
|
||||
height: 2in;
|
||||
}
|
||||
.upper {
|
||||
top: 0;
|
||||
}
|
||||
.lower{
|
||||
bottom: 0;
|
||||
}
|
||||
.left{
|
||||
left: 0;
|
||||
}
|
||||
.right{
|
||||
right: 0;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div class="upper left"></div>
|
||||
<div class="upper right"></div>
|
||||
<div class="lower left"></div>
|
||||
<div class="lower right"></div>
|
||||
</body>
|
|
@ -1255,6 +1255,20 @@ async function runTest44() {
|
|||
let test = "print_page_size3.html";
|
||||
let ref = "print_page_size3_ref.html";
|
||||
await compareFiles(test, ref, fuzz);
|
||||
requestAnimationFrame(() => setTimeout(runTest45));
|
||||
}
|
||||
|
||||
// Test that @page{ size: ... } results in scaling down the contents to fit on
|
||||
// a smaller paper size.
|
||||
// This depends on Firefox's current behavior of scaling oversized pages down
|
||||
// to fit onto the paper size.
|
||||
async function runTest45() {
|
||||
if (navigator.platform.includes("Mac")) {
|
||||
var fuzz = { maxDifferent: 15, maxDifference: 8 };
|
||||
}
|
||||
let test = "print_page_size4.html";
|
||||
let ref = "print_page_size4_ref.html";
|
||||
await compareFiles(test, ref, fuzz);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче