diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /layout/reftests/printing | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/printing')
23 files changed, 318 insertions, 0 deletions
diff --git a/layout/reftests/printing/print.css b/layout/reftests/printing/print.css new file mode 100644 index 0000000000..62f475ea2b --- /dev/null +++ b/layout/reftests/printing/print.css @@ -0,0 +1,7 @@ +@page { + margin: 0; +} + +p { + page-break-after: always; +} diff --git a/layout/reftests/printing/reftest.list b/layout/reftests/printing/reftest.list new file mode 100644 index 0000000000..eb571f067a --- /dev/null +++ b/layout/reftests/printing/reftest.list @@ -0,0 +1,21 @@ +# Note: The 'print' tests below that are annotated as 'fails' are really just +# testing the integrity of the reftest harness. Their testcases & reference +# case are known to differ, and we're testing that the harness correctly +# detects them as differing & correctly handles the 'fails' annotation. +# Some of these tests are used as their own reference to confirm basic +# text and page number matching works as expected. +print test-text.html test-text.html +fails print test-text.html test-text-noref.html +print test-number-of-pages.html test-number-of-pages.html +fails print test-number-of-pages.html test-number-of-pages-noref.html +print test-print-selection.html test-text-ref.html +print test-print-selection-shadow-dom.html test-text-ref.html +print test-print-selection-iframe.html test-text-ref.html +print test-print-range.html test-print-range-ref.html +print test-print-range-complex.html test-print-range-complex-ref.html +fails print test-print-single-page.html test-print-single-page-noref.html +print test-async-print.html test-text-ref.html +fails print test-unexpected-text.html test-unexpected-text-noref.html +fails print test-missing-text.html test-missing-text-noref.html +test-pref(print.print_in_color,false) fails print test-color-text-01.html test-color-text-01.html +print testcase-1696844.html testcase-1696844.html diff --git a/layout/reftests/printing/test-async-print.html b/layout/reftests/printing/test-async-print.html new file mode 100644 index 0000000000..b2ddec6449 --- /dev/null +++ b/layout/reftests/printing/test-async-print.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html class="reftest-wait"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> + <script> + window.addEventListener("MozReftestInvalidate", function() { + document.getElementById("page1").innerText = 'This text should appear on page 1'; + document.documentElement.className = ""; + }); + </script> +</head> +<body> + <p id="page1"></p> +</body> +</html> diff --git a/layout/reftests/printing/test-color-text-01.html b/layout/reftests/printing/test-color-text-01.html new file mode 100644 index 0000000000..bb51f10fab --- /dev/null +++ b/layout/reftests/printing/test-color-text-01.html @@ -0,0 +1,9 @@ +<!doctype html> +<style> +@media (monochrome) { + p { display: none } +} +</style> +<p style="color: red"> + Red +</p> diff --git a/layout/reftests/printing/test-missing-text-noref.html b/layout/reftests/printing/test-missing-text-noref.html new file mode 100644 index 0000000000..364ac7fabe --- /dev/null +++ b/layout/reftests/printing/test-missing-text-noref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p> + <span>This text appears in both the testcase and non-reference case.</span> + <b>But this text ONLY appears in the non-reference.</b> + </p> +</body> +</html> diff --git a/layout/reftests/printing/test-missing-text.html b/layout/reftests/printing/test-missing-text.html new file mode 100644 index 0000000000..ba2ecf9c55 --- /dev/null +++ b/layout/reftests/printing/test-missing-text.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p> + <span>This text appears in both the testcase and non-reference case.</span> + </p> +</body> +</html> diff --git a/layout/reftests/printing/test-number-of-pages-noref.html b/layout/reftests/printing/test-number-of-pages-noref.html new file mode 100644 index 0000000000..b6aee19ccc --- /dev/null +++ b/layout/reftests/printing/test-number-of-pages-noref.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> + <p>This text should appear on page 2</p> + <p>This text should appear on page 3</p> + <p>There shouldn't be another page</p> +</body> +</html> diff --git a/layout/reftests/printing/test-number-of-pages.html b/layout/reftests/printing/test-number-of-pages.html new file mode 100644 index 0000000000..27daa5988e --- /dev/null +++ b/layout/reftests/printing/test-number-of-pages.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> + <p>This text should appear on page 2</p> + <p>This text should appear on page 3</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-range-complex-ref.html b/layout/reftests/printing/test-print-range-complex-ref.html new file mode 100644 index 0000000000..27daa5988e --- /dev/null +++ b/layout/reftests/printing/test-print-range-complex-ref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> + <p>This text should appear on page 2</p> + <p>This text should appear on page 3</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-range-complex.html b/layout/reftests/printing/test-print-range-complex.html new file mode 100644 index 0000000000..6d829e6670 --- /dev/null +++ b/layout/reftests/printing/test-print-range-complex.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html reftest-print-range="2-2,4-5"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should not be here</p> + <p>This text should appear on page 1</p> + <p>This text should not be here</p> + <p>This text should appear on page 2</p> + <p>This text should appear on page 3</p> + <p>This text should not be here</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-range-ref.html b/layout/reftests/printing/test-print-range-ref.html new file mode 100644 index 0000000000..fb0df54721 --- /dev/null +++ b/layout/reftests/printing/test-print-range-ref.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> + <p>This text should appear on page 2</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-range.html b/layout/reftests/printing/test-print-range.html new file mode 100644 index 0000000000..7736db6da4 --- /dev/null +++ b/layout/reftests/printing/test-print-range.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html reftest-print-range="2-3"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should not be here</p> + <p>This text should appear on page 1</p> + <p>This text should appear on page 2</p> + <p>This text should not be here</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-selection-iframe.html b/layout/reftests/printing/test-print-selection-iframe.html new file mode 100644 index 0000000000..b3d39c2c52 --- /dev/null +++ b/layout/reftests/printing/test-print-selection-iframe.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html reftest-print-range="selection"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> + <script> + function selectNodeById(id) { + var node = document.getElementById(id); + var rng = document.createRange(); + rng.selectNode(node); + window.getSelection().addRange(rng); + } + </script> +</head> +<body onload="selectNodeById('selection')"> + <p>This text should not be there</p> + <p id="selection">This text should appear on page 1</p> + <iframe src="data:text/html,"></iframe> +</body> +</html> diff --git a/layout/reftests/printing/test-print-selection-shadow-dom.html b/layout/reftests/printing/test-print-selection-shadow-dom.html new file mode 100644 index 0000000000..c268131994 --- /dev/null +++ b/layout/reftests/printing/test-print-selection-shadow-dom.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html reftest-print-range="selection"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> + <script> + function selectNodesInShadowTree() { + let host = document.getElementById("host"); + host.attachShadow({ mode: "open" }).innerHTML = ` + <p>This text should not be there</p> + <p id="selection">This text should appear on page 1</p> + <p>This text should not be there</p> + `; + let rng = document.createRange(); + rng.selectNode(host.shadowRoot.getElementById("selection")); + window.getSelection().addRange(rng); + } + </script> +</head> +<body onload="selectNodesInShadowTree()"> + <p>This text should not be there</p> + <div id="host">Shouldn't show up (in the shadows)</div> + <p>This text should not be there</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-selection.html b/layout/reftests/printing/test-print-selection.html new file mode 100644 index 0000000000..ee1b02d3e5 --- /dev/null +++ b/layout/reftests/printing/test-print-selection.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html reftest-print-range="selection"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> + <script> + function selectNodeById(id) { + var node = document.getElementById(id); + var rng = document.createRange(); + rng.selectNode(node); + window.getSelection().addRange(rng); + } + </script> +</head> +<body onload="selectNodeById('selection')"> + <p>This text should not be there</p> + <p id="selection">This text should appear on page 1</p> + <p>This text should not be there</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-single-page-noref.html b/layout/reftests/printing/test-print-single-page-noref.html new file mode 100644 index 0000000000..81edd9511c --- /dev/null +++ b/layout/reftests/printing/test-print-single-page-noref.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> + <p>There shouldn't be another page</p> +</body> +</html> diff --git a/layout/reftests/printing/test-print-single-page.html b/layout/reftests/printing/test-print-single-page.html new file mode 100644 index 0000000000..1eff0fbc27 --- /dev/null +++ b/layout/reftests/printing/test-print-single-page.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html reftest-print-range="2-2"> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should not be here</p> + <p>This text should appear on page 1</p> + <p>This text should appear on page 2</p> + <p>This text should not be here</p> +</body> +</html> diff --git a/layout/reftests/printing/test-text-noref.html b/layout/reftests/printing/test-text-noref.html new file mode 100644 index 0000000000..160310a5db --- /dev/null +++ b/layout/reftests/printing/test-text-noref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This is not the text you're looking for</p> +</body> +</html> diff --git a/layout/reftests/printing/test-text-ref.html b/layout/reftests/printing/test-text-ref.html new file mode 100644 index 0000000000..bc93680640 --- /dev/null +++ b/layout/reftests/printing/test-text-ref.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> +</body> +</html> diff --git a/layout/reftests/printing/test-text.html b/layout/reftests/printing/test-text.html new file mode 100644 index 0000000000..bc93680640 --- /dev/null +++ b/layout/reftests/printing/test-text.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p>This text should appear on page 1</p> +</body> +</html> diff --git a/layout/reftests/printing/test-unexpected-text-noref.html b/layout/reftests/printing/test-unexpected-text-noref.html new file mode 100644 index 0000000000..ba2ecf9c55 --- /dev/null +++ b/layout/reftests/printing/test-unexpected-text-noref.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p> + <span>This text appears in both the testcase and non-reference case.</span> + </p> +</body> +</html> diff --git a/layout/reftests/printing/test-unexpected-text.html b/layout/reftests/printing/test-unexpected-text.html new file mode 100644 index 0000000000..8c705dd1bc --- /dev/null +++ b/layout/reftests/printing/test-unexpected-text.html @@ -0,0 +1,13 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <link href="print.css" rel="stylesheet"> +</head> +<body> + <p> + <span>This text appears in both the testcase and non-reference case.</span> + <b>But this text ONLY appears in the testcase.</b> + </p> +</body> +</html> diff --git a/layout/reftests/printing/testcase-1696844.html b/layout/reftests/printing/testcase-1696844.html new file mode 100644 index 0000000000..fbeaad4204 --- /dev/null +++ b/layout/reftests/printing/testcase-1696844.html @@ -0,0 +1,20 @@ +<html><head> +<meta http-equiv="content-type" content="text/html; charset=windows-1252"> +<link href="print.css" rel="stylesheet"> +<style> + .class3 { + mask: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAABsUlEQVQ4ja2QP2sUURTFf+ctMy9bGEEUFC2CiSGgYCOxEQvLNBEbP4UWYhNb9QsIfgTFKoKSRGIrSlbbQQuLdP5hCVabuW9mci12XDaSTQq9zeO98+ee8+AfR38/lGU5B52bsLcIOhMCtTvf3Pno3rzsdrvbBxoURZHPzc3fA78FhAkL3Z1nMWZPJVUjg6Io8tnZC08krgANaFXyzSzLin6fOD2dZiAsSSy7e+5OL8bsjqQGADNbMUufyjJtlmU5P6mvmV0yq9aH3Or+qLNZ6pmlD2a2cNSnmdlFs7RllnqDweBcgM7ysLPWYoxfjjKIMRagVSCEkN0OElcBJH99mNDdz5rZ85b7tj0vB3c/DZBl2fbh0asVYL3lfh0aaCYA3nLqSeK6rpckTuR5/gJgZ2dn5Bsk/w6QUjo/Ifrxum7ugj+UVAN0u8cWWqwf3PV+eNGNceHu7u51s2ojpWpDYivG+PkPlmW6NqzAu+DevJI0ANK4gRQegJ8CcgiL+1Op786vpmnW1EYJkvbGSWVpbySdbPGfU1Nx6aCKYbhtvxig0wmP3L3v7j86nfD4IPF/md886tFVRS8IagAAAABJRU5ErkJggg==); + } +</style> +<script> + function x1() { + progress1.style.setProperty("mix-blend-mode", "color-burn"); + ol1.textContent = String.fromCodePoint(10040); + } +</script> +</head><body> + Hold "enter" to prove you're not robot + + <ol id="ol1" class="class3">✸</ol> + <progress id="progress1" style="mix-blend-mode: color-burn;"> + <audio onloadstart="x1();" src="testcase-1696844_files/x.html" indeterminate="false"></audio></progress></body></html> |