From 277b72c715df6934b261b2c743f64e26ab49633a Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Mon, 12 Aug 2024 18:21:11 +0200 Subject: Add img-max-bounds HTML test Tests several combinations of size contraints on images so we can check if the aspect ratio is kept or not. --- test/html/Makefile.am | 2 ++ test/html/render/img-max-bounds.html | 41 ++++++++++++++++++++++++++++++++ test/html/render/img-max-bounds.ref.html | 41 ++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+) create mode 100644 test/html/render/img-max-bounds.html create mode 100644 test/html/render/img-max-bounds.ref.html diff --git a/test/html/Makefile.am b/test/html/Makefile.am index eee0e3fd..644a0b26 100644 --- a/test/html/Makefile.am +++ b/test/html/Makefile.am @@ -17,6 +17,7 @@ TESTS = \ render/github-infinite-loop.html \ render/hackernews.html \ render/img-aspect-ratio.html \ + render/img-max-bounds.html \ render/main-style.html \ render/margin-auto.html \ render/max-width-body.html \ @@ -45,6 +46,7 @@ XFAIL_TESTS = \ render/div-100-percent-with-padding.html \ render/float-img-justify.html \ render/img-aspect-ratio.html \ + render/img-max-bounds.html \ render/margin-auto.html \ render/max-width-html.html \ render/min-width-html.html \ diff --git a/test/html/render/img-max-bounds.html b/test/html/render/img-max-bounds.html new file mode 100644 index 00000000..8adc2867 --- /dev/null +++ b/test/html/render/img-max-bounds.html @@ -0,0 +1,41 @@ + + + + Test image aspect ratio while constrained + + + +
+

All images should be 32px by 32px like this one:

+ +

Only one max-* contraint

+ + + + +

One max-* and fixed size contraint

+ + + + +

Two max-* contraints

+ + + + +

Both min-* and max-* constrained

+ + + + +

Bad constraints

+ + + + +
+ + diff --git a/test/html/render/img-max-bounds.ref.html b/test/html/render/img-max-bounds.ref.html new file mode 100644 index 00000000..464767dd --- /dev/null +++ b/test/html/render/img-max-bounds.ref.html @@ -0,0 +1,41 @@ + + + + Test image aspect ratio while constrained + + + +
+

All images should be 32px by 32px like this one:

+ +

Only one max-* contraint

+ + + + +

One max-* and fixed size contraint

+ + + + +

Two max-* contraints

+ + + + +

Both min-* and max-* constrained

+ + + + +

Bad constraints

+ + + + +
+ + -- cgit v1.2.3