summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-backgrounds/hidpi
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-backgrounds/hidpi
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-backgrounds/hidpi')
-rw-r--r--testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color-ref.html15
-rw-r--r--testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color.html19
2 files changed, 34 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color-ref.html b/testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color-ref.html
new file mode 100644
index 0000000000..1030d005d9
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color-ref.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<body>
+ <canvas id="canvas" width="400" height="800" style="image-rendering: crisp-edges"></canvas>
+</body>
+<script>
+ var canvas = document.getElementById('canvas');
+ canvas.style.width = (canvas.width / 2) + 'px';
+ canvas.style.height = (canvas.height / 2) + 'px';
+ var ctx = canvas.getContext('2d');
+ ctx.scale(2, 2);
+ ctx.fillStyle = 'green';
+ ctx.fillRect(0, 0, 100, 150);
+ ctx.fillStyle = 'red';
+ ctx.fillRect(0, 150, 200, 250);
+</script>
diff --git a/testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color.html b/testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color.html
new file mode 100644
index 0000000000..07bea44d21
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/hidpi/simple-bg-color.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-color">
+<link rel="match" href="simple-bg-color-ref.html">
+<style>
+.box1 {
+ width: 100px;
+ height: 150px;
+ background-color: green;
+}
+.box2 {
+ width: 200px;
+ height: 250px;
+ background-color: red;
+}
+</style>
+<body>
+ <div class='box1'></div>
+ <div class='box2'></div>
+</body>