summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css-backgrounds
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css-backgrounds')
-rw-r--r--testing/web-platform/tests/css-backgrounds/background-size-cover-003-ref.html21
-rw-r--r--testing/web-platform/tests/css-backgrounds/background-size-cover-003.html38
2 files changed, 59 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css-backgrounds/background-size-cover-003-ref.html b/testing/web-platform/tests/css-backgrounds/background-size-cover-003-ref.html
new file mode 100644
index 000000000..bd965cfec
--- /dev/null
+++ b/testing/web-platform/tests/css-backgrounds/background-size-cover-003-ref.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<title>CSS Test Reference</title>
+<style>
+body { margin: 0 }
+.first {
+ width: 100px;
+ height: 50px;
+ background: lime;
+}
+.space {
+ height: 50px;
+}
+.second {
+ width: 100px;
+ height: 100px;
+ background: lime;
+}
+</style>
+<div class="first"></div>
+<div class="space"></div>
+<div class="second"></div>
diff --git a/testing/web-platform/tests/css-backgrounds/background-size-cover-003.html b/testing/web-platform/tests/css-backgrounds/background-size-cover-003.html
new file mode 100644
index 000000000..4d2b6b125
--- /dev/null
+++ b/testing/web-platform/tests/css-backgrounds/background-size-cover-003.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<title>CSS Test: background-size: cover with zero-sized background positioning area.</title>
+<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#valdef-background-size-cover">
+<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/4049">
+<link rel="help" href=" https://bugzilla.mozilla.org/show_bug.cgi?id=1559094">
+<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
+<link rel="author" href="https://mozilla.org" title="Mozilla">
+<link rel="match" href="background-size-cover-003-ref.html">
+<style>
+body { margin: 0 }
+div {
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: top left;
+ background-origin: content-box;
+ background-image: url(/images/green-100x50.png);
+}
+#test1 {
+ height: 0;
+ width: 100px;
+ padding-bottom: 100px;
+}
+
+#test2 {
+ height: 100px;
+ width: 0;
+ padding-right: 100px;
+}
+#test3 {
+ height: 0;
+ width: 0;
+ padding-right: 100px;
+ padding-bottom: 100px;
+}
+</style>
+<div id="test1"></div>
+<div id="test2"></div>
+<div id="test3"></div>