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 /layout/reftests/reftest-sanity | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/reftest-sanity')
105 files changed, 1665 insertions, 0 deletions
diff --git a/layout/reftests/reftest-sanity/647192-1-ref.html b/layout/reftests/reftest-sanity/647192-1-ref.html new file mode 100644 index 0000000000..d1a673c62d --- /dev/null +++ b/layout/reftests/reftest-sanity/647192-1-ref.html @@ -0,0 +1,12 @@ +<html><head>
+<style>
+div {
+ outline: 1px solid black;
+}
+</style>
+
+</head><body>
+You should see no red, only green<br>
+ <div style="overflow: scroll; height: 200px; z-index: 2; position: relative; background-color: lime;"></div>
+ </div>
+</body></html>
diff --git a/layout/reftests/reftest-sanity/647192-1.html b/layout/reftests/reftest-sanity/647192-1.html new file mode 100644 index 0000000000..365f7652fe --- /dev/null +++ b/layout/reftests/reftest-sanity/647192-1.html @@ -0,0 +1,16 @@ +<html><head>
+<style>
+div {
+ outline: 1px solid black;
+}
+</style>
+
+</head><body>
+You should see no red, only green<br>
+ <div style="overflow: scroll; height: 200px; z-index: 2; position: relative; background-color: red;"></div>
+ <div class="displayport" reftest-displayport-h="500" style="overflow: scroll; position: relative; margin-top: -200px; height: 200px;">
+ <div style="z-index: 10; position: absolute; width: 100%; height: 500px; bottom: -300px;">
+ <div style="height: 200px; background-color: lime;"></div>
+ </div>
+ </div>
+</body></html>
diff --git a/layout/reftests/reftest-sanity/656041-1-ref.html b/layout/reftests/reftest-sanity/656041-1-ref.html new file mode 100644 index 0000000000..a92943594f --- /dev/null +++ b/layout/reftests/reftest-sanity/656041-1-ref.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=UTF-8"> + <meta charset="utf-8"> + <title>Reftest</title> + <style type="text/css"> + ul { + position: absolute; + top: 50px; + bottom: 0px; + left: 0; + right: 0; + overflow: auto; + } + li { + height: 2000px; + } + a { + float: left; + color: black; + border: solid black 1px; + } + </style> + </head> + <body> + <ul> + <li> + <a href="#"> </a> + </li> + </ul> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/656041-1.html b/layout/reftests/reftest-sanity/656041-1.html new file mode 100644 index 0000000000..d888fbe400 --- /dev/null +++ b/layout/reftests/reftest-sanity/656041-1.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset=UTF-8"> + <meta charset="utf-8"> + <title>Reftest</title> + <style type="text/css"> + ul { + position: absolute; + top: 50px; + bottom: 0px; + left: 0; + right: 0; + overflow: auto; + } + li { + height: 2000px; + } + a { + float: left; + color: black; + border: solid black 1px; + } + </style> + </head> + <body> + <ul class="displayport"> + <li> + <a href="#"> </a> + </li> + </ul> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/async-scroll-1-ref.html b/layout/reftests/reftest-sanity/async-scroll-1-ref.html new file mode 100644 index 0000000000..f68227c188 --- /dev/null +++ b/layout/reftests/reftest-sanity/async-scroll-1-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html> +<body style="background:red;"> + <div style="position:absolute; background:lime; top:0; left:0; width:800px; height:1000px"></div> + <div style="position:absolute; background:yellow; bottom:0; left:50px; width:50px; height:50px"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-scroll-1a.html b/layout/reftests/reftest-sanity/async-scroll-1a.html new file mode 100644 index 0000000000..63e4cff372 --- /dev/null +++ b/layout/reftests/reftest-sanity/async-scroll-1a.html @@ -0,0 +1,11 @@ +<!DOCTYPE HTML> +<html reftest-async-scroll + reftest-displayport-x="0" reftest-displayport-y="0" + reftest-displayport-w="800" reftest-displayport-h="2000" + reftest-async-scroll-x="0" reftest-async-scroll-y="50" + style="scrollbar-width:none"> +<body style="background:red; margin:0"> + <div style="position:absolute; background:lime; top:50px; left:0; width:800px; height:1000px"></div> + <div style="position:absolute; background:yellow; bottom:-50px; left:50px; width:50px; height:50px"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-scroll-1b.html b/layout/reftests/reftest-sanity/async-scroll-1b.html new file mode 100644 index 0000000000..dc4b89b959 --- /dev/null +++ b/layout/reftests/reftest-sanity/async-scroll-1b.html @@ -0,0 +1,11 @@ +<!DOCTYPE HTML> +<html reftest-async-scroll + reftest-displayport-x="0" reftest-displayport-y="0" + reftest-displayport-w="800" reftest-displayport-h="1000" + reftest-async-scroll-x="0" reftest-async-scroll-y="50" + style="scrollbar-width:none"> +<body style="background:red; margin:0"> + <div style="position:absolute; background:lime; top:50px; left:0; width:800px; height:1000px"></div> + <div style="position:absolute; background:yellow; bottom:-50px; left:50px; width:50px; height:50px"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-scroll-1c.html b/layout/reftests/reftest-sanity/async-scroll-1c.html new file mode 100644 index 0000000000..46dd62a40d --- /dev/null +++ b/layout/reftests/reftest-sanity/async-scroll-1c.html @@ -0,0 +1,11 @@ +<!DOCTYPE HTML> +<html reftest-async-scroll + reftest-displayport-x="0" reftest-displayport-y="0" + reftest-displayport-w="800" reftest-displayport-h="2000" + reftest-async-scroll-x="0" reftest-async-scroll-y="20" + style="scrollbar-width:none"> +<body style="background:red; margin:0" onload="window.scrollTo(0,30)"> + <div style="position:absolute; background:lime; top:50px; left:0; width:800px; height:1000px"></div> + <div style="position:absolute; background:yellow; bottom:-50px; left:50px; width:50px; height:50px"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-zoom-1-ref.html b/layout/reftests/reftest-sanity/async-zoom-1-ref.html new file mode 100644 index 0000000000..734bce16da --- /dev/null +++ b/layout/reftests/reftest-sanity/async-zoom-1-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body> +This is some content. +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-zoom-1.html b/layout/reftests/reftest-sanity/async-zoom-1.html new file mode 100644 index 0000000000..7f4d2244d1 --- /dev/null +++ b/layout/reftests/reftest-sanity/async-zoom-1.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html reftest-async-zoom="1.5"> +<body> +This is some content. +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-zoom-2-ref.html b/layout/reftests/reftest-sanity/async-zoom-2-ref.html new file mode 100644 index 0000000000..939f62579f --- /dev/null +++ b/layout/reftests/reftest-sanity/async-zoom-2-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body> +<div style="position: absolute; top: 0; left: 0; width: 200px; height: 200px; background: red"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/async-zoom-2.html b/layout/reftests/reftest-sanity/async-zoom-2.html new file mode 100644 index 0000000000..6ca8836788 --- /dev/null +++ b/layout/reftests/reftest-sanity/async-zoom-2.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html reftest-async-zoom="2"> +<body> +<div style="position:absolute; top: 0; left: 0; width: 100px; height: 100px; background: red;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/bg.png b/layout/reftests/reftest-sanity/bg.png Binary files differnew file mode 100644 index 0000000000..deefd19b2a --- /dev/null +++ b/layout/reftests/reftest-sanity/bg.png diff --git a/layout/reftests/reftest-sanity/blank.html b/layout/reftests/reftest-sanity/blank.html new file mode 100644 index 0000000000..eaca3f49fd --- /dev/null +++ b/layout/reftests/reftest-sanity/blank.html @@ -0,0 +1,5 @@ +<!DOCTYPE html> +<html> +<body> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-1-ref.html b/layout/reftests/reftest-sanity/corners-1-ref.html new file mode 100644 index 0000000000..e002df8150 --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-1-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:lime; position:absolute; left:0; top:0;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-1.html b/layout/reftests/reftest-sanity/corners-1.html new file mode 100644 index 0000000000..d1461fc19a --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-1.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:red; position:absolute; left:0; top:0;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-2-ref.html b/layout/reftests/reftest-sanity/corners-2-ref.html new file mode 100644 index 0000000000..89a5a0928c --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-2-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:lime; position:absolute; left:599px; top:0;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-2.html b/layout/reftests/reftest-sanity/corners-2.html new file mode 100644 index 0000000000..05c3d4a209 --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-2.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:red; position:absolute; left:599px; top:0;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-3-ref.html b/layout/reftests/reftest-sanity/corners-3-ref.html new file mode 100644 index 0000000000..eb28b7712b --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-3-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:lime; position:absolute; left:599px; top:599px;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-3.html b/layout/reftests/reftest-sanity/corners-3.html new file mode 100644 index 0000000000..47c30a61ad --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-3.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:red; position:absolute; left:599px; top:599px;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-4-ref.html b/layout/reftests/reftest-sanity/corners-4-ref.html new file mode 100644 index 0000000000..976b298abd --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-4-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:lime; position:absolute; left:0; top:599px;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/corners-4.html b/layout/reftests/reftest-sanity/corners-4.html new file mode 100644 index 0000000000..c46d501196 --- /dev/null +++ b/layout/reftests/reftest-sanity/corners-4.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="overflow:hidden"> + <div style="width:1px; height:1px; background:red; position:absolute; left:0; top:599px;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/default.html b/layout/reftests/reftest-sanity/default.html new file mode 100644 index 0000000000..e80f240e0f --- /dev/null +++ b/layout/reftests/reftest-sanity/default.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> +<body> +<div>Text</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/defaults-tests.list b/layout/reftests/reftest-sanity/defaults-tests.list new file mode 100644 index 0000000000..d6e90100c3 --- /dev/null +++ b/layout/reftests/reftest-sanity/defaults-tests.list @@ -0,0 +1,30 @@ +# test defaults + +# test defaults with a pref() +defaults pref(font.size.variable.x-western,24) +!= font-default.html font-size-16.html +== font-default.html font-size-24.html + +# test that a default preference can be overridden +pref(font.size.variable.x-western,16) == font-default.html font-size-16.html +pref(font.size.variable.x-western,16) != font-default.html font-size-24.html + +# test that default preferences are kept when other test-specific preferences are set +pref(font.size.variable.zh-HK,36) != font-default.html font-size-16.html +pref(font.size.variable.zh-HK,36) == font-default.html font-size-24.html + +# test defaults with test-pref() and ref-pref() +defaults test-pref(font.size.variable.x-western,16) ref-pref(font.size.variable.x-western,24) +!= font-default.html font-default.html +== font-default.html font-size-16.html +== font-size-24.html font-default.html + +# test defaults with skip and skip-if +defaults skip +== font-size-16.html font-size-24.html +defaults skip-if(true) +== font-size-16.html font-size-24.html + +# test resetting defaults +defaults +== font-default.html font-default.html diff --git a/layout/reftests/reftest-sanity/div-ref.html b/layout/reftests/reftest-sanity/div-ref.html new file mode 100644 index 0000000000..a798096def --- /dev/null +++ b/layout/reftests/reftest-sanity/div-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html> + <body> + <span style="display:block">aaa</span> + <span style="display:block">bbb</span> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/div.html b/layout/reftests/reftest-sanity/div.html new file mode 100644 index 0000000000..f1bcffaf11 --- /dev/null +++ b/layout/reftests/reftest-sanity/div.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> + <body> + <div>aaa</div> + <div>bbb</div> + </body> +</html> + diff --git a/layout/reftests/reftest-sanity/exampleorg-1-ref.html b/layout/reftests/reftest-sanity/exampleorg-1-ref.html new file mode 100644 index 0000000000..003050fde8 --- /dev/null +++ b/layout/reftests/reftest-sanity/exampleorg-1-ref.html @@ -0,0 +1 @@ +<iframe src="green.html"> diff --git a/layout/reftests/reftest-sanity/exampleorg-1.html b/layout/reftests/reftest-sanity/exampleorg-1.html new file mode 100644 index 0000000000..84ae66849f --- /dev/null +++ b/layout/reftests/reftest-sanity/exampleorg-1.html @@ -0,0 +1 @@ +<iframe src="http://example.org/green.html"> diff --git a/layout/reftests/reftest-sanity/filter-1-ref.xhtml b/layout/reftests/reftest-sanity/filter-1-ref.xhtml new file mode 100644 index 0000000000..32f3a01b5b --- /dev/null +++ b/layout/reftests/reftest-sanity/filter-1-ref.xhtml @@ -0,0 +1,20 @@ + <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Filter sanity-check</title> + <style type="text/css"> + html, body { margin: 0; background: white; height: 100%; width: 100%; } + body { position: relative; } + </style> + </head> + <body> + + <div style="position: absolute; top: 10px; left: 10px; width: 100px; height: 10px; background: black"></div> + + <div style="position: absolute; top: 30px; left: 10px; width: 94px; height: 4px; border: 3px solid #000;"></div> + + <div style="position: absolute; top: 50px; left: 10px; width: 100px; height: 10px; background: black"></div> + + <div style="position: absolute; top: 70px; left: 10px; width: 94px; height: 4px; border: 3px solid #000;"></div> + + </body> + </html> diff --git a/layout/reftests/reftest-sanity/filter-1.xhtml b/layout/reftests/reftest-sanity/filter-1.xhtml new file mode 100644 index 0000000000..5cc01f1e29 --- /dev/null +++ b/layout/reftests/reftest-sanity/filter-1.xhtml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="1.1"> + + <!-- use an empty g to force filters.svg to load before onload --> + <use xlink:href="../filters.svg#empty" /> + + <foreignObject filter="url(../filters.svg#NonWhiteToBlack)" + x="0" y="0" height="100%" width="100%"> + <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Filter sanity-check</title> + <style type="text/css"> + html, body { margin: 0; background: white; color: black; height: 100%; width: 100%; } + body { position: relative; } + </style> + </head> + <body> + + <div style="position: absolute; top: 10px; left: 10px; width: 100px; height: 10px; background: green"></div> + + <div style="position: absolute; top: 30px; left: 10px; width: 94px; height: 4px; border: 3px solid #c90;"></div> + + <div style="position: absolute; top: 50px; left: 10px; width: 100px; height: 10px; background: black"></div> + + <div style="position: absolute; top: 70px; left: 10px; width: 94px; height: 4px; border: 3px solid #000;"></div> + + </body> + </html> + </foreignObject> +</svg> diff --git a/layout/reftests/reftest-sanity/filter-2-ref.xhtml b/layout/reftests/reftest-sanity/filter-2-ref.xhtml new file mode 100644 index 0000000000..c2514ba380 --- /dev/null +++ b/layout/reftests/reftest-sanity/filter-2-ref.xhtml @@ -0,0 +1,16 @@ + <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Filter sanity-check</title> + <style type="text/css"> + html, body { margin: 0; background: white; height: 100%; width: 100%; } + body { position: relative; } + </style> + </head> + <body> + + <div style="position: absolute; top: 50px; left: 10px; width: 100px; height: 10px; background: black"></div> + + <div style="position: absolute; top: 70px; left: 10px; width: 94px; height: 4px; border: 3px solid #000;"></div> + + </body> + </html> diff --git a/layout/reftests/reftest-sanity/filter-2.xhtml b/layout/reftests/reftest-sanity/filter-2.xhtml new file mode 100644 index 0000000000..4dd67951ed --- /dev/null +++ b/layout/reftests/reftest-sanity/filter-2.xhtml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + version="1.1"> + + <!-- use an empty g to force filters.svg to load before onload --> + <use xlink:href="../filters.svg#empty" /> + + <foreignObject filter="url(../filters.svg#NonBlackToWhite)" + x="0" y="0" height="100%" width="100%"> + <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Filter sanity-check</title> + <style type="text/css"> + html, body { margin: 0; background: white; color: black; height: 100%; width: 100%; } + body { position: relative; } + </style> + </head> + <body> + + <div style="position: absolute; top: 10px; left: 10px; width: 100px; height: 10px; background: green"></div> + + <div style="position: absolute; top: 30px; left: 10px; width: 94px; height: 4px; border: 3px solid #c90;"></div> + + <div style="position: absolute; top: 50px; left: 10px; width: 100px; height: 10px; background: black"></div> + + <div style="position: absolute; top: 70px; left: 10px; width: 94px; height: 4px; border: 3px solid #000;"></div> + + </body> + </html> + </foreignObject> +</svg> diff --git a/layout/reftests/reftest-sanity/font-default.html b/layout/reftests/reftest-sanity/font-default.html new file mode 100644 index 0000000000..3bdf2d555f --- /dev/null +++ b/layout/reftests/reftest-sanity/font-default.html @@ -0,0 +1,12 @@ +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<style type="text/css"> +div { +} +</style> +</head> +<body> +<div>Hello world 123</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/font-download.html b/layout/reftests/reftest-sanity/font-download.html new file mode 100644 index 0000000000..2ab084ca4a --- /dev/null +++ b/layout/reftests/reftest-sanity/font-download.html @@ -0,0 +1,17 @@ +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<style type="text/css"> +@font-face { + font-family: foo; + src: url(../fonts/DejaVuSansMono.woff); +} +div { + font-family: foo; +} +</style> +</head> +<body> +<div>Hello world 123</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/font-sans-serif.html b/layout/reftests/reftest-sanity/font-sans-serif.html new file mode 100644 index 0000000000..ac22b4ee5f --- /dev/null +++ b/layout/reftests/reftest-sanity/font-sans-serif.html @@ -0,0 +1,13 @@ +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<style type="text/css"> +div { + font-family: sans-serif; +} +</style> +</head> +<body> +<div>Hello world 123</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/font-serif.html b/layout/reftests/reftest-sanity/font-serif.html new file mode 100644 index 0000000000..f3f22ef22d --- /dev/null +++ b/layout/reftests/reftest-sanity/font-serif.html @@ -0,0 +1,13 @@ +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<style type="text/css"> +div { + font-family: serif; +} +</style> +</head> +<body> +<div>Hello world 123</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/font-size-16.html b/layout/reftests/reftest-sanity/font-size-16.html new file mode 100644 index 0000000000..2be81f9dc1 --- /dev/null +++ b/layout/reftests/reftest-sanity/font-size-16.html @@ -0,0 +1,13 @@ +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<style type="text/css"> +div { + font-size: 16px; +} +</style> +</head> +<body> +<div>Hello world 123</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/font-size-24.html b/layout/reftests/reftest-sanity/font-size-24.html new file mode 100644 index 0000000000..8907a10793 --- /dev/null +++ b/layout/reftests/reftest-sanity/font-size-24.html @@ -0,0 +1,13 @@ +<html lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<style type="text/css"> +div { + font-size: 24px; +} +</style> +</head> +<body> +<div>Hello world 123</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/fuzzy-ref.html b/layout/reftests/reftest-sanity/fuzzy-ref.html new file mode 100644 index 0000000000..776c7911d8 --- /dev/null +++ b/layout/reftests/reftest-sanity/fuzzy-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <div style="background: #ff00ff; width: 500px; height: 500px;"></div> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/fuzzy.html b/layout/reftests/reftest-sanity/fuzzy.html new file mode 100644 index 0000000000..d288560e96 --- /dev/null +++ b/layout/reftests/reftest-sanity/fuzzy.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <div style="background: #ff01ff; width: 500px; height: 500px;"></div> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/green.html b/layout/reftests/reftest-sanity/green.html new file mode 100644 index 0000000000..d1695cb8b8 --- /dev/null +++ b/layout/reftests/reftest-sanity/green.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> +<body> +<div style="color: green">Text</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/html-vs-xhtml-by-extension.html b/layout/reftests/reftest-sanity/html-vs-xhtml-by-extension.html new file mode 100644 index 0000000000..033e9ad72d --- /dev/null +++ b/layout/reftests/reftest-sanity/html-vs-xhtml-by-extension.html @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Test that XHTML vs. HTML processing decision is made by file extension</title> + <style type="text/css"> + p { border: medium solid; margin: 1em; padding: 1em; } + </style> +</head> +<body> + +<p>This is a paragraph. +<p>This is a paragraph. +</p> +</p> + +</body> +</html> diff --git a/layout/reftests/reftest-sanity/html-vs-xhtml-by-extension.xhtml b/layout/reftests/reftest-sanity/html-vs-xhtml-by-extension.xhtml new file mode 100644 index 0000000000..033e9ad72d --- /dev/null +++ b/layout/reftests/reftest-sanity/html-vs-xhtml-by-extension.xhtml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Test that XHTML vs. HTML processing decision is made by file extension</title> + <style type="text/css"> + p { border: medium solid; margin: 1em; padding: 1em; } + </style> +</head> +<body> + +<p>This is a paragraph. +<p>This is a paragraph. +</p> +</p> + +</body> +</html> diff --git a/layout/reftests/reftest-sanity/invalidation.html b/layout/reftests/reftest-sanity/invalidation.html new file mode 100644 index 0000000000..85c3a16fd3 --- /dev/null +++ b/layout/reftests/reftest-sanity/invalidation.html @@ -0,0 +1,12 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body style="border:10px solid pink;"> +<script> + function doTest() { + document.body.style.border = ""; + document.documentElement.removeAttribute('class'); +} +document.addEventListener("MozReftestInvalidate", doTest); +</script> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/needs-focus.html b/layout/reftests/reftest-sanity/needs-focus.html new file mode 100644 index 0000000000..10fdada2bd --- /dev/null +++ b/layout/reftests/reftest-sanity/needs-focus.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <script type="text/javascript"> +function focusInput() { + document.getElementById('i').focus(); +} +function done() { + document.documentElement.className = ''; +} + </script> + <body onload="focusInput();"> + <input type="text" id="i" onfocus="done();"> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/no-root.html b/layout/reftests/reftest-sanity/no-root.html new file mode 100644 index 0000000000..9ed41863a6 --- /dev/null +++ b/layout/reftests/reftest-sanity/no-root.html @@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html> +<body> +<script type="text/javascript"> +document.removeChild(document.documentElement); +</script> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/page-backgrounds-notref.html b/layout/reftests/reftest-sanity/page-backgrounds-notref.html new file mode 100644 index 0000000000..2be703654b --- /dev/null +++ b/layout/reftests/reftest-sanity/page-backgrounds-notref.html @@ -0,0 +1,3 @@ +<!doctype html> +<html class="reftest-paged" reftest-paged-backgrounds="false"> + <p style="print-color-adjust: exact; color: white; background: black;">Something</p> diff --git a/layout/reftests/reftest-sanity/page-backgrounds-ref.html b/layout/reftests/reftest-sanity/page-backgrounds-ref.html new file mode 100644 index 0000000000..8662502414 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-backgrounds-ref.html @@ -0,0 +1,3 @@ +<!doctype html> +<html class="reftest-paged"> + <p style="color: black;">Something</p> diff --git a/layout/reftests/reftest-sanity/page-backgrounds.html b/layout/reftests/reftest-sanity/page-backgrounds.html new file mode 100644 index 0000000000..05241fe84c --- /dev/null +++ b/layout/reftests/reftest-sanity/page-backgrounds.html @@ -0,0 +1,3 @@ +<!doctype html> +<html class="reftest-paged" reftest-paged-backgrounds="false"> + <p style="color: white; background: black;">Something</p> diff --git a/layout/reftests/reftest-sanity/page-height-2.1in.html b/layout/reftests/reftest-sanity/page-height-2.1in.html new file mode 100644 index 0000000000..4c77439eef --- /dev/null +++ b/layout/reftests/reftest-sanity/page-height-2.1in.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content height is 2 inches (3 inch page, half inch margins)</title> +<style> +body { margin: 0 } +div { height: 2.1in; } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/page-height-2in.html b/layout/reftests/reftest-sanity/page-height-2in.html new file mode 100644 index 0000000000..db2d927db2 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-height-2in.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content height is 2 inches (3 inch page, half inch margins)</title> +<style> +body { margin: 0 } +div { height: 2in; } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/page-height-forcebreak.html b/layout/reftests/reftest-sanity/page-height-forcebreak.html new file mode 100644 index 0000000000..6fc306b181 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-height-forcebreak.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content height is 2 inches (3 inch page, half inch margins)</title> +<style> +body { margin: 0 } +</style> +<div>hello</div> +<div style="page-break-before: always"> </div> diff --git a/layout/reftests/reftest-sanity/page-height-nobreak.html b/layout/reftests/reftest-sanity/page-height-nobreak.html new file mode 100644 index 0000000000..6c4e832ce3 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-height-nobreak.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content height is 2 inches (3 inch page, half inch margins)</title> +<style> +body { margin: 0 } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/page-width-3.9in.html b/layout/reftests/reftest-sanity/page-width-3.9in.html new file mode 100644 index 0000000000..25a727bc60 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-width-3.9in.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content width is 4 inches (5 inch page, half inch margins)</title> +<style> +body { margin: 0 } +div { background: blue; color: white; width: 3.9in; } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/page-width-4.1in.html b/layout/reftests/reftest-sanity/page-width-4.1in.html new file mode 100644 index 0000000000..8791e58679 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-width-4.1in.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content width is 4 inches (5 inch page, half inch margins)</title> +<style> +body { margin: 0 } +div { background: blue; color: white; width: 4.1in; } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/page-width-4in.html b/layout/reftests/reftest-sanity/page-width-4in.html new file mode 100644 index 0000000000..b9576b5c48 --- /dev/null +++ b/layout/reftests/reftest-sanity/page-width-4in.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content width is 4 inches (5 inch page, half inch margins)</title> +<style> +body { margin: 0 } +div { background: blue; color: white; width: 4in; } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/page-width-auto.html b/layout/reftests/reftest-sanity/page-width-auto.html new file mode 100644 index 0000000000..fccc0f9b9c --- /dev/null +++ b/layout/reftests/reftest-sanity/page-width-auto.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html class="reftest-paged"> +<title>Test that reftest-paged page content width is 4 inches (5 inch page, half inch margins)</title> +<style> +body { margin: 0 } +div { background: blue; color: white; } +</style> +<div>hello</div> diff --git a/layout/reftests/reftest-sanity/prefix-suffix.html b/layout/reftests/reftest-sanity/prefix-suffix.html new file mode 100644 index 0000000000..fed54adbdd --- /dev/null +++ b/layout/reftests/reftest-sanity/prefix-suffix.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<title>suffix - test url-prefix for script test</title> +<script type="text/javascript"> +function getTestCases() +{ + return [ + { testPassed: (function () { return true; }), testDescription: (function () { return "passed"; }) } + ]; +} +</script> +</head> +<body> +<h1>suffix - test url-prefix for script test</h1> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/prefix/scripttest-fail.html b/layout/reftests/reftest-sanity/prefix/scripttest-fail.html new file mode 100644 index 0000000000..7172902f14 --- /dev/null +++ b/layout/reftests/reftest-sanity/prefix/scripttest-fail.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<title>scripttest-fail</title> +<script type="text/javascript"> +function getTestCases() +{ + return [ + { testPassed: (function () { return false; }), testDescription: (function () { return "failed"; }) } + ]; +} +</script> +</head> +<body> +<h1>scripttest-fail</h1> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/prefix/suffix.html b/layout/reftests/reftest-sanity/prefix/suffix.html new file mode 100644 index 0000000000..fa99971a51 --- /dev/null +++ b/layout/reftests/reftest-sanity/prefix/suffix.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<title>suffix - test url-prefix containing / for script test</title> +<script type="text/javascript"> +function getTestCases() +{ + return [ + { testPassed: (function () { return true; }), testDescription: (function () { return "passed"; }) } + ]; +} +</script> +</head> +<body> +<h1>suffix - test url-prefix containing / for script test</h1> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/prefix/urlprefixtests-include.list b/layout/reftests/reftest-sanity/prefix/urlprefixtests-include.list new file mode 100644 index 0000000000..62e08a2d4f --- /dev/null +++ b/layout/reftests/reftest-sanity/prefix/urlprefixtests-include.list @@ -0,0 +1,7 @@ +# test url-prefix on include commands. + +# This include file should not be loaded if url-prefix is ignored for +# the include command in ../urlprefixtests.list. The test fails if +# this test is loaded. + +script scripttest-fail.html diff --git a/layout/reftests/reftest-sanity/red.html b/layout/reftests/reftest-sanity/red.html new file mode 100644 index 0000000000..a9db5be4df --- /dev/null +++ b/layout/reftests/reftest-sanity/red.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> +<body> +<div style="color: red">Text</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-1.html b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-1.html new file mode 100644 index 0000000000..c1810a67f7 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-1.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>This test will fail because .high-z is not in the same layer as .low-z</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; + margin: 10px; +} + +.relative { + position: relative; +} + +.fixed { + position: fixed; + top: 140px; + left: 140px; +} + +.low-z { + z-index: 1; +} + +.mid-z { + z-index: 2; +} + +.high-z { + z-index: 3; +} + +.opaque-background { + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> + +<div class="fixed opaque-background content mid-z" reftest-assigned-layer="fixed-layer"></div> + +<div class="content relative high-z" reftest-assigned-layer="page-background"></div> diff --git a/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-2.html b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-2.html new file mode 100644 index 0000000000..16c36860a0 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-2.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>This test will fail because .mid-z is not in the same layer as .low-z</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; + margin: 10px; +} + +.relative { + position: relative; +} + +.fixed { + position: fixed; + top: 140px; + left: 140px; +} + +.low-z { + z-index: 1; +} + +.mid-z { + z-index: 2; +} + +.high-z { + z-index: 3; +} + +.opaque-background { + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> + +<div class="fixed opaque-background content mid-z" reftest-assigned-layer="page-background"></div> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> diff --git a/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-3.html b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-3.html new file mode 100644 index 0000000000..6e97dfba63 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-3.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>This test will fail because .high-z is not in the same layer as .mid-z</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; + margin: 10px; +} + +.relative { + position: relative; +} + +.fixed { + position: fixed; + top: 140px; + left: 140px; +} + +.low-z { + z-index: 1; +} + +.mid-z { + z-index: 2; +} + +.high-z { + z-index: 3; +} + +.opaque-background { + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> + +<div class="fixed opaque-background content mid-z" reftest-assigned-layer="fixed-layer"></div> + +<div class="content relative low-z" reftest-assigned-layer="fixed-layer"></div> diff --git a/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-4.html b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-4.html new file mode 100644 index 0000000000..92bcbdbdc4 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-assigned-layer-fail-4.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>This test will fail because the some-other-layer gets merged into the page background layer</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; + margin: 10px; +} + +.relative { + position: relative; +} + +.fixed { + position: fixed; + top: 140px; + left: 140px; +} + +.low-z { + z-index: 1; +} + +.mid-z { + z-index: 2; +} + +.high-z { + z-index: 3; +} + +.opaque-background { + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> + +<div class="fixed opaque-background content mid-z" reftest-assigned-layer="fixed-layer"></div> + +<div class="content relative low-z" reftest-assigned-layer="some-other-layer"></div> diff --git a/layout/reftests/reftest-sanity/reftest-assigned-layer-pass.html b/layout/reftests/reftest-sanity/reftest-assigned-layer-pass.html new file mode 100644 index 0000000000..19dc004d81 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-assigned-layer-pass.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>Both divs should be part of opaque layers.</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; + margin: 10px; +} + +.relative { + position: relative; +} + +.fixed { + position: fixed; + top: 140px; + left: 140px; +} + +.low-z { + z-index: 1; +} + +.high-z { + z-index: 2; +} + +.opaque-background { + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> + +<div class="fixed opaque-background content high-z" reftest-assigned-layer="fixed-layer"></div> + +<div class="content relative low-z" reftest-assigned-layer="page-background"></div> diff --git a/layout/reftests/reftest-sanity/reftest-no-flush-ref.html b/layout/reftests/reftest-sanity/reftest-no-flush-ref.html new file mode 100644 index 0000000000..6cc270a570 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-no-flush-ref.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<style> +html { + overflow: hidden; +} +body { + margin: 0px; + padding: 0px; +} +#target { + width: 100px; + height: 100px; + position: absolute; + transform: translateX(100px); + background-color: green; +} +</style> +<div id="target"></div> +</html> diff --git a/layout/reftests/reftest-sanity/reftest-no-flush.html b/layout/reftests/reftest-sanity/reftest-no-flush.html new file mode 100644 index 0000000000..8893e6eb71 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-no-flush.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html class="reftest-wait reftest-no-flush"> +<style> +html { + /* Suppress scrollbars to avoid periodical unthrottling for transform */ + /* animations on the compositor. */ + overflow: hidden; +} +body { + margin: 0px; + padding: 0px; +} +@keyframes anim { + 0% { transform: translateX(100px); } + 100% { transform: translateX(100px); } +} +#target { + width: 100px; + height: 100px; + position: absolute; + background-color: green; +} +</style> +<div id="target"></div> +<script> +document.addEventListener('MozReftestInvalidate', () => { + // Set a bit longer animation delay to avoid painting the initial animation + // style on the main thread. + target.style.animation = "anim 100s 1s"; + target.addEventListener("animationstart", () => { + requestAnimationFrame(() => { + requestAnimationFrame(() => { + document.documentElement.classList.remove("reftest-wait"); + }); + }); + }); +}, { once: true }); +</script> +</html> diff --git a/layout/reftests/reftest-sanity/reftest-no-paint-ref.html b/layout/reftests/reftest-sanity/reftest-no-paint-ref.html new file mode 100644 index 0000000000..f8b0679de6 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-no-paint-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html> +<body style="background-color: black"> +<div style="background-color: rgba(255, 0, 0, 0.5); width:100px; height:100px;" > +</div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/reftest-no-paint.html b/layout/reftests/reftest-sanity/reftest-no-paint.html new file mode 100644 index 0000000000..0c49b49647 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-no-paint.html @@ -0,0 +1,15 @@ +<!DOCTYPE HTML> +<html class="reftest-wait"> +<body> +<div class="reftest-no-paint" style="background-color: rgba(255, 0, 0, 0.5); width:100px; height:100px;" > +</div> +<script type="application/javascript"> + +function doTest() { + document.body.style.background = "black"; + document.documentElement.removeAttribute("class"); +} +document.addEventListener("MozReftestInvalidate", doTest); +</script> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/reftest-opaque-layer-fail.html b/layout/reftests/reftest-sanity/reftest-opaque-layer-fail.html new file mode 100644 index 0000000000..bb8a17e858 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-opaque-layer-fail.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>The fixed layer can't be opaque, so this test must fail.</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; +} + +.fixed { + position: fixed; + top: 20px; + left: 140px; +} + +body { + height: 4000px; +} + +</style> + +<div class="content reftest-opaque-layer"></div> + +<div class="fixed content reftest-opaque-layer"></div> diff --git a/layout/reftests/reftest-sanity/reftest-opaque-layer-pass.html b/layout/reftests/reftest-sanity/reftest-opaque-layer-pass.html new file mode 100644 index 0000000000..6286bb36b8 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-opaque-layer-pass.html @@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html lang="en"> +<meta charset="utf-8"> +<title>Both divs should be part of opaque layers.</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; +} + +.fixed { + position: fixed; + top: 20px; + left: 140px; +} + +.opaque-background { + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content reftest-opaque-layer"></div> + +<div class="fixed opaque-background content reftest-opaque-layer"></div> diff --git a/layout/reftests/reftest-sanity/reftest-opaque-layer-wait-fail.html b/layout/reftests/reftest-sanity/reftest-opaque-layer-wait-fail.html new file mode 100644 index 0000000000..50e1dd86e3 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-opaque-layer-wait-fail.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html lang="en" class="reftest-wait"> +<meta charset="utf-8"> +<title>The fixed layer can't be opaque in the final paint, so this test must fail.</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; +} + +.fixed { + position: fixed; + top: 20px; + left: 140px; +} + +.reftest-wait .reftest-opaque-layer { + /* make the layer opaque until the final paint */ + background-color: white; +} + +body { + height: 4000px; +} + +</style> + +<div class="content reftest-opaque-layer"></div> + +<div class="fixed content reftest-opaque-layer"></div> + +<script> + +function doTest() { + document.documentElement.removeAttribute("class"); +} +document.addEventListener("MozReftestInvalidate", doTest); + +</script> diff --git a/layout/reftests/reftest-sanity/reftest-opaque-layer-wait-pass.html b/layout/reftests/reftest-sanity/reftest-opaque-layer-wait-pass.html new file mode 100644 index 0000000000..9fdc303533 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-opaque-layer-wait-pass.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html lang="en" class="reftest-wait"> +<meta charset="utf-8"> +<title>Both divs should be part of opaque layers in the final paint.</title> + +<style> + +.content { + box-sizing: border-box; + width: 200px; + height: 200px; + border: 1px solid black; +} + +.fixed { + position: fixed; + top: 20px; + left: 140px; +} + +.opaque-background { + background-color: white; +} + +.reftest-wait .opaque-background { + /* make the layer start out transparent */ + background-color: transparent; +} + +body { + height: 4000px; +} + +</style> + +<div class="content reftest-opaque-layer"></div> + +<div class="fixed opaque-background content reftest-opaque-layer"></div> + +<script> + +function doTest() { + document.documentElement.removeAttribute("class"); +} +document.addEventListener("MozReftestInvalidate", doTest); + +</script> + diff --git a/layout/reftests/reftest-sanity/reftest-resolution-ref.html b/layout/reftests/reftest-sanity/reftest-resolution-ref.html new file mode 100644 index 0000000000..51b6d7afcc --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-resolution-ref.html @@ -0,0 +1,16 @@ +<html> + <style> + html { + scrollbar-width: none; + } + body { + margin: 0; + } + div { + width: 200px; + height: 200px; + background: green; + } + </style> + <div></div> +</html> diff --git a/layout/reftests/reftest-sanity/reftest-resolution.html b/layout/reftests/reftest-sanity/reftest-resolution.html new file mode 100644 index 0000000000..d9a5f7b5e7 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest-resolution.html @@ -0,0 +1,16 @@ +<html reftest-resolution="2.0"> + <style> + html { + scrollbar-width: none; + } + body { + margin: 0; + } + div { + width: 100px; + height: 100px; + background: green; + } + </style> + <div></div> +</html> diff --git a/layout/reftests/reftest-sanity/reftest.list b/layout/reftests/reftest-sanity/reftest.list new file mode 100644 index 0000000000..1aa272d6e2 --- /dev/null +++ b/layout/reftests/reftest-sanity/reftest.list @@ -0,0 +1,218 @@ +== data:text/html,<body> about:blank +== data:text/plain, about:blank +!= data:text/plain,HELLO about:blank + +# these tests make sure async reftests work: +== chrome://reftest/content/reftest-sanity/test-async.xhtml chrome://reftest/content/reftest-sanity/test-async-ref.xhtml +== test-async.html test-async-ref.html + +# test that zoom works (and really zooms, not just scales) +fails-if(useDrawSnapshot) == test-zoom.html test-zoom-ref.html + +== text-zoom.html text-zoom-ref.html +!= text-zoom.html text-zoom-notref.html + +# make sure we don't fall over if the root is missing +== no-root.html about:blank + +# Makes sure that the file: protocol handler and HTTP server both +# choose HTML vs. XHTML processing based on the file extensions. +!= html-vs-xhtml-by-extension.html html-vs-xhtml-by-extension.xhtml +HTTP != html-vs-xhtml-by-extension.html html-vs-xhtml-by-extension.xhtml + +# make sure red and green colors are not the default and are different from +# each other +!= green.html default.html +!= green.html red.html +!= red.html default.html + +# Make sure about:blank works, even via HTTP. +== blank.html about:blank +== about:blank blank.html +HTTP == blank.html about:blank +HTTP == about:blank blank.html +# same for data: +== default.html data:text/html,<div>Text</div> +== data:text/html,<div>Text</div> default.html +HTTP == default.html data:text/html,<div>Text</div> +HTTP == data:text/html,<div>Text</div> default.html +!= blank.html default.html +HTTP != blank.html default.html + +fails-if(geckoview&&device) == filter-1.xhtml filter-1-ref.xhtml +fails-if(geckoview&&device) == filter-2.xhtml filter-2-ref.xhtml + +# test that the MozReftestInvalidate event fires +== invalidation.html about:blank +fails-if(useDrawSnapshot) == zoom-invalidation.html zoom-invalidation-ref.html # bug 773482 + +# test that xulRuntime.OS works +fails-if(xulRuntime.OS!="Linux"&&!Android) == data:text/html,<body>Linux data:text/html,<script>document.write(navigator.platform.substr(0,5))</script> +fails-if(xulRuntime.OS!="WINNT") == data:text/html,<body>Win data:text/html,<script>document.write(navigator.platform.substr(0,3))</script> +fails-if(xulRuntime.OS!="Darwin") == data:text/html,<body>Mac data:text/html,<script>document.write(navigator.platform.substr(0,3))</script> + +# test parsing of asserts() expressions +asserts(0) load about:blank +asserts(0-5) load about:blank +asserts-if(true,0) load about:blank +asserts-if(false,7) load about:blank +asserts-if(true,0-4) load about:blank +asserts-if(false,6-8) load about:blank + +# test that <div> is display:block +== div.html div-ref.html + +# test script keyword +include scripttests.list + +# test url-prefix +include urlprefixtests.list + +# test defaults +include defaults-tests.list + +# test that all corners are visible +!= corners-1.html corners-1-ref.html +!= corners-2.html corners-2-ref.html +!= corners-3.html corners-3-ref.html +!= corners-4.html corners-4-ref.html + +# Test that the harness gives the correct page dimensions. +!= page-width-3.9in.html page-width-4in.html +== page-width-4.1in.html page-width-4in.html +== page-width-auto.html page-width-4in.html +!= page-height-2in.html page-height-2.1in.html +== page-height-2in.html page-height-nobreak.html +== page-height-2.1in.html page-height-forcebreak.html + +# Check that tests that need focus are skipped when it's not available +needs-focus load needs-focus.html + +# Bug 632636 +fails == data:text/plain,HELLO about:blank +needs-focus == data:text/plain, about:blank + +# Sanity check of viewport+displayport overrides +pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote) fails-if(useDrawSnapshot) != test-displayport-2.html test-displayport-ref.html # bug 593168 +skip-if(!browserIsRemote) fails-if(OSX&&layersGPUAccelerated) fuzzy-if(layersOMTC,0-1,0-1390) random-if(Android) random-if(transparentScrollbars) == 647192-1.html 647192-1-ref.html +skip-if(!browserIsRemote) == 656041-1.html 656041-1-ref.html +pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote||layersOMTC) == test-displayport-bg.html test-displayport-ref.html # bug 694706 + +# IPC Position-fixed frames/layers test +# Fixed layers are temporarily disabled (bug 656167). +#pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote) == test-pos-fixed.html test-pos-fixed-ref.html +#pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote) == test-bg-attachment-fixed.html test-bg-attachment-fixed-ref.html +pref(dom.meta-viewport.enabled,true) skip-if(!browserIsRemote) == test-pos-fixed-transform.html test-pos-fixed-transform-ref.html + +# reftest syntax: require-or +require-or(unrecognizedCondition,skip) script scripttest-fail.html +require-or(true&&unrecognizedCondition,skip) script scripttest-fail.html +require-or(unrecognizedCondition&&true,skip) script scripttest-fail.html +require-or(unrecognizedCondition,fails) script scripttest-fail.html +require-or(true,fails) script scripttest-pass.html +require-or(true&&true,fails) script scripttest-pass.html + +# tests for pref(...) syntax in manifest, including "fails" examples with incorrect prefs +# a boolean pref +pref(gfx.downloadable_fonts.enabled,true) != font-download.html font-default.html +pref(gfx.downloadable_fonts.enabled,false) == font-download.html font-default.html +fails pref(gfx.downloadable_fonts.enabled,0) == font-download.html font-default.html +fails pref(gfx.downloadable_fonts.enabled,"foo") == font-download.html font-default.html +# a non-existent pref +fails pref(not.a.real.pref.name,1) == font-download.html font-default.html +# an integer pref +pref(font.size.variable.x-western,16) == font-size-16.html font-default.html +pref(font.size.variable.x-western,16) != font-size-24.html font-default.html +pref(font.size.variable.x-western,24) == font-size-24.html font-default.html +pref(font.size.variable.x-western,24) != font-size-16.html font-default.html +fails pref(font.size.variable.x-western,false) == font-size-16.html font-default.html +fails pref(font.size.variable.x-western,"foo") == font-size-16.html font-default.html +# a string pref +pref(font.default.x-western,"serif") == font-serif.html font-default.html +pref(font.default.x-western,"serif") != font-sans-serif.html font-default.html +pref(font.default.x-western,"sans-serif") == font-sans-serif.html font-default.html +pref(font.default.x-western,"sans-serif") != font-serif.html font-default.html +fails pref(font.default.x-western,true) == font-serif.html font-default.html +fails pref(font.default.x-western,0) == font-serif.html font-default.html +# tests for ref-pref, and test-pref +ref-pref(font.size.variable.x-western,16) == font-size-16.html font-default.html +ref-pref(font.size.variable.x-western,16) != font-size-24.html font-default.html +ref-pref(font.size.variable.x-western,24) == font-size-24.html font-default.html +ref-pref(font.size.variable.x-western,24) != font-size-16.html font-default.html +fails ref-pref(font.size.variable.x-western,false) == font-size-16.html font-default.html +fails ref-pref(font.size.variable.x-western,"foo") == font-size-16.html font-default.html +test-pref(font.size.variable.x-western,16) == font-default.html font-size-16.html +test-pref(font.size.variable.x-western,16) != font-default.html font-size-24.html +test-pref(font.size.variable.x-western,24) == font-default.html font-size-24.html +test-pref(font.size.variable.x-western,24) != font-default.html font-size-16.html +fails test-pref(font.size.variable.x-western,false) == font-default.html font-size-16.html +fails test-pref(font.size.variable.x-western,"foo") == font-default.html font-size-16.html +ref-pref(font.size.variable.x-western,16) test-pref(font.size.variable.x-western,24) != font-default.html font-default.html +ref-pref(font.size.variable.x-western,24) test-pref(font.size.variable.x-western,16) != font-default.html font-default.html +ref-pref(font.size.variable.x-western,24) test-pref(font.size.variable.x-western,24) == font-default.html font-default.html + +# reftest syntax: fuzzy(0-maxPixelDifference,0-maxNumberDifferingPixels) +noautofuzz fuzzy(0-1,0-250000) == fuzzy.html fuzzy-ref.html +noautofuzz fuzzy(0-1,0-250000) != too-fuzzy.html fuzzy-ref.html +noautofuzz fuzzy-if(true,0-1,0-250000) == fuzzy.html fuzzy-ref.html +noautofuzz fuzzy-if(false,0-2,0-1) == fuzzy-ref.html fuzzy-ref.html +# test some ranged fuzzes +noautofuzz fuzzy(1-10,1-250000) fuzzy-if(false,5-10,0-250000) == fuzzy.html fuzzy-ref.html +noautofuzz fuzzy(0-0,0-250000) != fuzzy.html fuzzy-ref.html +noautofuzz fuzzy(0-1,0-2) != fuzzy.html fuzzy-ref.html +# If enabled, the following two should result in UNEXPECTED-PASS because +# they are both overfuzzed +# noautofuzz fuzzy(3-4,0-250000) == fuzzy.html fuzzy-ref.html +# noautofuzz fuzzy(0-1,250001-250002) == fuzzy.html fuzzy-ref.html +# +# When using 565 fuzzy.html and fuzzy-ref.html will compare as equal +noautofuzz fails fuzzy-if(false,0-2,0-1) == fuzzy.html fuzzy-ref.html + +# Test that reftest-no-paint fails correctly. +== reftest-no-paint.html reftest-no-paint-ref.html + +skip-if(!asyncPan||!browserIsRemote) == async-scroll-1a.html async-scroll-1-ref.html + +skip-if(!asyncPan||!browserIsRemote) != async-scroll-1b.html async-scroll-1-ref.html + +skip-if(!asyncPan||!browserIsRemote) == async-scroll-1c.html async-scroll-1-ref.html + +skip-if(!Android) pref(apz.allow_zooming,true) != async-zoom-1.html async-zoom-1-ref.html +fuzzy(0-112,0-800) skip-if(!Android) pref(apz.allow_zooming,true) == async-zoom-2.html async-zoom-2-ref.html + +# reftest-opaque-layer +== reftest-opaque-layer-pass.html reftest-opaque-layer-pass.html +!= reftest-opaque-layer-pass.html about:blank +!= about:blank reftest-opaque-layer-pass.html +== reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html + +# If reftest-opaque-layer fails (no matter whether it fails in the test or in the reference), +# it shouldn't matter whether the test matches the reference. +fails != reftest-opaque-layer-fail.html reftest-opaque-layer-fail.html +fails == reftest-opaque-layer-fail.html about:blank +fails == about:blank reftest-opaque-layer-fail.html +!= reftest-opaque-layer-fail.html about:blank +!= about:blank reftest-opaque-layer-fail.html + +# reftest-opaque-layer and reftest-wait +== reftest-opaque-layer-wait-pass.html reftest-opaque-layer-pass.html +!= reftest-opaque-layer-wait-pass.html about:blank +== reftest-opaque-layer-wait-fail.html reftest-opaque-layer-fail.html +!= reftest-opaque-layer-wait-fail.html about:blank + +# reftest-assigned-layer +!= reftest-assigned-layer-pass.html about:blank +!= reftest-assigned-layer-fail-1.html about:blank +!= reftest-assigned-layer-fail-2.html about:blank +!= reftest-assigned-layer-fail-3.html about:blank +!= reftest-assigned-layer-fail-4.html about:blank + +# reftest-resolution +pref(apz.allow_zooming,true) fails-if(useDrawSnapshot) == reftest-resolution.html reftest-resolution-ref.html + +== reftest-no-flush.html reftest-no-flush-ref.html + +skip-if(Android) HTTP == exampleorg-1.html exampleorg-1-ref.html + +== page-backgrounds.html page-backgrounds-ref.html +!= page-backgrounds.html page-backgrounds-notref.html diff --git a/layout/reftests/reftest-sanity/scripttest-fail.html b/layout/reftests/reftest-sanity/scripttest-fail.html new file mode 100644 index 0000000000..7172902f14 --- /dev/null +++ b/layout/reftests/reftest-sanity/scripttest-fail.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<title>scripttest-fail</title> +<script type="text/javascript"> +function getTestCases() +{ + return [ + { testPassed: (function () { return false; }), testDescription: (function () { return "failed"; }) } + ]; +} +</script> +</head> +<body> +<h1>scripttest-fail</h1> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/scripttest-pass-fail.html b/layout/reftests/reftest-sanity/scripttest-pass-fail.html new file mode 100644 index 0000000000..848e21b119 --- /dev/null +++ b/layout/reftests/reftest-sanity/scripttest-pass-fail.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<title>scripttest-pass-fail</title> +<script type="text/javascript"> +function getTestCases() +{ + return [ + { testPassed: (function () { return false; }), testDescription: (function () { return "fail"; }) }, + { testPassed: (function () { return true; }), testDescription: (function () { return "expected random pass"; }) } + ]; +} +</script> +</head> +<body> +<h1>scripttest-pass-fail</h1> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/scripttest-pass.html b/layout/reftests/reftest-sanity/scripttest-pass.html new file mode 100644 index 0000000000..e0371b3518 --- /dev/null +++ b/layout/reftests/reftest-sanity/scripttest-pass.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<title>scripttest-pass</title> +<script type="text/javascript"> +function getTestCases() +{ + return [ + { testPassed: (function () { return true; }), testDescription: (function () { return "passed"; }) } + ]; +} +</script> +</head> +<body> +<h1>scripttest-pass</h1> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/scripttests.list b/layout/reftests/reftest-sanity/scripttests.list new file mode 100644 index 0000000000..18be27e59e --- /dev/null +++ b/layout/reftests/reftest-sanity/scripttests.list @@ -0,0 +1,10 @@ +# test script keyword. + +# cases where the test does not include an appropriate getTestCases() function, +# or where getTestCases() does not return an array of objects with methods +# testPassed() and testDescription() can not be included since they always +# produce unexpected failures. + +script scripttest-pass.html +fails script scripttest-fail.html +fails script scripttest-pass-fail.html diff --git a/layout/reftests/reftest-sanity/test-async-ref.html b/layout/reftests/reftest-sanity/test-async-ref.html new file mode 100644 index 0000000000..7d92f683df --- /dev/null +++ b/layout/reftests/reftest-sanity/test-async-ref.html @@ -0,0 +1,2 @@ +<html> +<body style="background-color: green;"> diff --git a/layout/reftests/reftest-sanity/test-async-ref.xhtml b/layout/reftests/reftest-sanity/test-async-ref.xhtml new file mode 100644 index 0000000000..690fc60aa9 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-async-ref.xhtml @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + style="background-color: green"/> diff --git a/layout/reftests/reftest-sanity/test-async.html b/layout/reftests/reftest-sanity/test-async.html new file mode 100644 index 0000000000..db24cf42b7 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-async.html @@ -0,0 +1,12 @@ +<html class="reftest-wait"> +<body style="background-color: red;" + onload="HandleLoad()"> + <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ document.body.style.backgroundColor = "green";
+ document.documentElement.className = "";
+ }, 100);
+ }
+ </script>
+</body>
diff --git a/layout/reftests/reftest-sanity/test-async.xhtml b/layout/reftests/reftest-sanity/test-async.xhtml new file mode 100644 index 0000000000..e8dc869ad3 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-async.xhtml @@ -0,0 +1,15 @@ +<?xml version="1.0"?> +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + id="main"
+ class="reftest-wait" + style="background-color: red;"
+ onload="HandleLoad()">
+ <script>
+ function HandleLoad() {
+ setTimeout(function() {
+ document.documentElement.style.backgroundColor = "green";
+ document.documentElement.className = "";
+ }, 100);
+ }
+ </script>
+</window> diff --git a/layout/reftests/reftest-sanity/test-bg-attachment-fixed-ref.html b/layout/reftests/reftest-sanity/test-bg-attachment-fixed-ref.html new file mode 100644 index 0000000000..f336883097 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-bg-attachment-fixed-ref.html @@ -0,0 +1,16 @@ +<html reftest-displayport-w="800" reftest-displayport-h="1000"> +<head> +<meta name="viewport" content="width=800; height=1000; initial-scale=1.0"> +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> +<style type="text/css"> +body +{ +background-image:url("bg.png"); +background-repeat:no-repeat; +background-attachment:fixed; +} +</style> +</head> +<body> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-bg-attachment-fixed.html b/layout/reftests/reftest-sanity/test-bg-attachment-fixed.html new file mode 100644 index 0000000000..12ca1c2c51 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-bg-attachment-fixed.html @@ -0,0 +1,22 @@ +<html style="overflow:hidden" + reftest-displayport-w="800" reftest-displayport-h="1000"> +<head> +<meta name="viewport" content="width=800; height=1000; initial-scale=1.0"> +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> +<script> + function run() { + window.scrollTo(0, 30); + } +</script> +<style type="text/css"> +body +{ +background-image:url("bg.png"); +background-repeat:no-repeat; +background-attachment:fixed; +} +</style> +</head> +<body onload="run()" style="height: 10000px"> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-displayport-2.html b/layout/reftests/reftest-sanity/test-displayport-2.html new file mode 100644 index 0000000000..6772732d76 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-displayport-2.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html reftest-displayport-w="200" reftest-displayport-h="200"> +<meta name="viewport" content="width=100; height=100; initial-scale=1.0"> +<body> + <div style="position: absolute; left:0px; top:0px;width:800px; height:1000px; background:green;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-displayport-bg.html b/layout/reftests/reftest-sanity/test-displayport-bg.html new file mode 100644 index 0000000000..6044de36f2 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-displayport-bg.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html reftest-displayport-w="400" reftest-displayport-h="500" + reftest-async-scroll> +<meta name="viewport" content="width=100; height=100; initial-scale=1.0"> +<body bgcolor=green style="position: absolute; left:0px; top:0px;width:800px; height:1000px;"></body> +</html> + diff --git a/layout/reftests/reftest-sanity/test-displayport-ref.html b/layout/reftests/reftest-sanity/test-displayport-ref.html new file mode 100644 index 0000000000..b699a79a31 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-displayport-ref.html @@ -0,0 +1,4 @@ +<!DOCTYPE HTML> +<html> +<body style="background:green;"></body> +</html> diff --git a/layout/reftests/reftest-sanity/test-pos-fixed-ref.html b/layout/reftests/reftest-sanity/test-pos-fixed-ref.html new file mode 100644 index 0000000000..864e6418cd --- /dev/null +++ b/layout/reftests/reftest-sanity/test-pos-fixed-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html reftest-displayport-w="200" reftest-displayport-h="100" +<meta name="viewport" content="width=200; height=100; initial-scale=1.0"> +<body> +<div style="position:fixed;top:0px;width:100%;height:10px;background-color:green;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-pos-fixed-transform-ref.html b/layout/reftests/reftest-sanity/test-pos-fixed-transform-ref.html new file mode 100644 index 0000000000..0b2870ff55 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-pos-fixed-transform-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html> +<meta name="viewport" content="width=800; height=1000; initial-scale=1.0"> +<body> +<div style="position: fixed; background: lightblue; top: 0; left: 0; width:100px; height:100px; -moz-transform: translate(360px,0px);"/> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-pos-fixed-transform.html b/layout/reftests/reftest-sanity/test-pos-fixed-transform.html new file mode 100644 index 0000000000..d15b646149 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-pos-fixed-transform.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html reftest-displayport-w="800" reftest-displayport-h="1000"> +<meta name="viewport" content="width=800; height=1000; initial-scale=1.0"> +<body> +<div style="position: fixed; background: lightblue; top: 0; left: 0; width:100px; height:100px; -moz-transform: translate(360px,0px);"/> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-pos-fixed.html b/layout/reftests/reftest-sanity/test-pos-fixed.html new file mode 100644 index 0000000000..7c792cf224 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-pos-fixed.html @@ -0,0 +1,8 @@ +<!DOCTYPE HTML> +<html reftest-displayport-w="200" reftest-displayport-h="100" + reftest-displayport-x="0" reftest-displayport-y="10"> +<meta name="viewport" content="width=200; height=100; initial-scale=1.0"> +<body> +<div style="position:fixed;top:0px;width:100%;height:10px;background-color:green;"> </div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-zoom-ref.html b/layout/reftests/reftest-sanity/test-zoom-ref.html new file mode 100644 index 0000000000..16fd8cbfba --- /dev/null +++ b/layout/reftests/reftest-sanity/test-zoom-ref.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html> +<body style="margin:0;"> +<div style="background:yellow; height:15px;"></div> +<div style="position:absolute; top:150px; left:150px; width:150px; height:150px; border:1px solid black;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/test-zoom.html b/layout/reftests/reftest-sanity/test-zoom.html new file mode 100644 index 0000000000..d663030a93 --- /dev/null +++ b/layout/reftests/reftest-sanity/test-zoom.html @@ -0,0 +1,7 @@ +<!DOCTYPE HTML> +<html reftest-zoom="1.5"> +<body style="margin:0;"> +<div style="background:yellow; height:10px;"></div> +<div style="position:absolute; top:100px; left:100px; width:100px; height:100px; border:1px solid black;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/text-zoom-notref.html b/layout/reftests/reftest-sanity/text-zoom-notref.html new file mode 100644 index 0000000000..b2be86b253 --- /dev/null +++ b/layout/reftests/reftest-sanity/text-zoom-notref.html @@ -0,0 +1,2 @@ +<!doctype html> +<div style="font: 16px/1 monospace">Foo</div> diff --git a/layout/reftests/reftest-sanity/text-zoom-ref.html b/layout/reftests/reftest-sanity/text-zoom-ref.html new file mode 100644 index 0000000000..6140f537fe --- /dev/null +++ b/layout/reftests/reftest-sanity/text-zoom-ref.html @@ -0,0 +1,2 @@ +<!doctype html> +<div style="font: 32px/1 monospace">Foo</div> diff --git a/layout/reftests/reftest-sanity/text-zoom.html b/layout/reftests/reftest-sanity/text-zoom.html new file mode 100644 index 0000000000..13ced799a8 --- /dev/null +++ b/layout/reftests/reftest-sanity/text-zoom.html @@ -0,0 +1,3 @@ +<!doctype html> +<html reftest-text-zoom="2"> +<div style="font: 16px/1 monospace">Foo</div> diff --git a/layout/reftests/reftest-sanity/too-fuzzy.html b/layout/reftests/reftest-sanity/too-fuzzy.html new file mode 100644 index 0000000000..e9b5c2ce5a --- /dev/null +++ b/layout/reftests/reftest-sanity/too-fuzzy.html @@ -0,0 +1,6 @@ +<!DOCTYPE html> +<html> + <body> + <div style="background: #ff04ff; width: 500px; height: 500px;"></div> + </body> +</html> diff --git a/layout/reftests/reftest-sanity/urlprefixtests-include.list b/layout/reftests/reftest-sanity/urlprefixtests-include.list new file mode 100644 index 0000000000..623d5b0239 --- /dev/null +++ b/layout/reftests/reftest-sanity/urlprefixtests-include.list @@ -0,0 +1,6 @@ +# test url-prefix on include commands. + +# This include file should be loaded if url-prefix is ignored for +# the include command in urlprefixtests.list. + +script scripttest-pass.html diff --git a/layout/reftests/reftest-sanity/urlprefixtests.list b/layout/reftests/reftest-sanity/urlprefixtests.list new file mode 100644 index 0000000000..0d55fc33e2 --- /dev/null +++ b/layout/reftests/reftest-sanity/urlprefixtests.list @@ -0,0 +1,23 @@ +# test url-prefix + +# test that url-prefix is not be applied to absolute uris. +url-prefix absolute + +== data:text/html,<body> about:blank +== data:text/plain, about:blank +!= data:text/plain,HELLO about:blank + +# test that url-prefix is applied to test items. +url-prefix prefix- + +script suffix.html + +# test if url-prefix containing / works. +url-prefix prefix/ + +script suffix.html + +# test that url-prefix should not be applied to include commands. + +include urlprefixtests-include.list + diff --git a/layout/reftests/reftest-sanity/zoom-invalidation-ref.html b/layout/reftests/reftest-sanity/zoom-invalidation-ref.html new file mode 100644 index 0000000000..e51d313131 --- /dev/null +++ b/layout/reftests/reftest-sanity/zoom-invalidation-ref.html @@ -0,0 +1,6 @@ +<!DOCTYPE HTML> +<html> +<body style="margin:0;"> +<div id="d" style="position:absolute; top:23px; left:23px; width:150px; height:150px; background:yellow;"></div> +</body> +</html> diff --git a/layout/reftests/reftest-sanity/zoom-invalidation.html b/layout/reftests/reftest-sanity/zoom-invalidation.html new file mode 100644 index 0000000000..98e5655e90 --- /dev/null +++ b/layout/reftests/reftest-sanity/zoom-invalidation.html @@ -0,0 +1,13 @@ +<!DOCTYPE HTML> +<html reftest-zoom="1.5" class="reftest-wait"> +<body style="margin:0;"> +<div id="d" style="position:absolute; top:15px; left:15px; width:100px; height:100px;"></div> +<script> +function doTest() { + document.getElementById("d").style.background = "yellow"; + document.documentElement.removeAttribute('class'); +} +document.addEventListener("MozReftestInvalidate", doTest); +</script> +</body> +</html> |