summaryrefslogtreecommitdiffstats
path: root/layout/reftests/box-properties/CSS21-t100303-make-images.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /layout/reftests/box-properties/CSS21-t100303-make-images.html
parentInitial commit. (diff)
downloadfirefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.tar.xz
firefox-esr-0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/box-properties/CSS21-t100303-make-images.html')
-rw-r--r--layout/reftests/box-properties/CSS21-t100303-make-images.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/layout/reftests/box-properties/CSS21-t100303-make-images.html b/layout/reftests/box-properties/CSS21-t100303-make-images.html
new file mode 100644
index 0000000000..c397e26af1
--- /dev/null
+++ b/layout/reftests/box-properties/CSS21-t100303-make-images.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html lang="en-US">
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Script-Type" content="text/javascript">
+ <script type="text/javascript">
+
+ var gWidth = 1024;
+ var gHeight = 1;
+ var gBarriers = [ 170, 334, 340, 344, 350, 458 ];
+
+ var gColors = [ "green", "red" ];
+
+ function append_url(filename, contents_url) {
+ var p = document.createElement("p");
+ var a = document.createElement("a");
+ a.href = contents_url;
+ var t = document.createTextNode("CSS21-t100303-" + filename);
+ a.appendChild(t);
+ p.appendChild(a);
+ document.body.appendChild(p);
+ }
+
+ function run() {
+ var canvas = document.getElementById("canvas");
+ var cx = canvas.getContext("2d");
+ for (var i in gBarriers) {
+ var barrier = gBarriers[i];
+
+ cx.fillStyle = gColors[1];
+ cx.fillRect(0, 0, gWidth, gHeight);
+ cx.fillStyle = gColors[0];
+ cx.fillRect(0, 0, barrier, gHeight);
+ append_url(gColors[0] + "-in-" + barrier + "px.png",
+ canvas.toDataURL("image/png"));
+
+ cx.fillStyle = gColors[0];
+ cx.fillRect(0, 0, gWidth, gHeight);
+ cx.fillStyle = gColors[1];
+ cx.fillRect(0, 0, barrier, gHeight);
+ append_url(gColors[0] + "-outside-" + barrier + "px.png",
+ canvas.toDataURL("image/png"));
+ }
+ }
+
+ </script>
+</head>
+<body onload="run()">
+
+<canvas width="1024" height="1" id="canvas"></canvas>
+
+</body>
+</html>