diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-08-24 18:26:05 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2025-08-30 16:08:34 +0200 |
commit | 582d27413faef25d9abd4f1f6dfc18f5e9b8cc5c (patch) | |
tree | e31e2bee639cfa206000eb94b6b01069e4f9b086 | |
parent | d50233962821c1d678df0618d6d29f4e8c0eb596 (diff) |
Add html test for form elements with display:none
-rw-r--r-- | test/html/Makefile.am | 1 | ||||
-rw-r--r-- | test/html/render/form-display-none.html | 45 | ||||
-rw-r--r-- | test/html/render/form-display-none.ref.html | 17 |
3 files changed, 63 insertions, 0 deletions
diff --git a/test/html/Makefile.am b/test/html/Makefile.am index 648d96c9..fc959b1f 100644 --- a/test/html/Makefile.am +++ b/test/html/Makefile.am @@ -15,6 +15,7 @@ TESTS = \ render/b-div.html \ render/div-100-percent-with-padding.html \ render/float-img-justify.html \ + render/form-display-none.html \ render/github-infinite-loop.html \ render/hackernews.html \ render/img-aspect-ratio-absolute.html \ diff --git a/test/html/render/form-display-none.html b/test/html/render/form-display-none.html new file mode 100644 index 00000000..fec9c96c --- /dev/null +++ b/test/html/render/form-display-none.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <title>Test form inputs with display:none</title> + <style> + /* * { border: solid 1px blue; margin: 5px; padding: 5px; } */ + .container { display: none; } + </style> + </head> + <body> + <hr> + <p>There are some elements below, but you shouldn't see any. Disable CSS to + see them.</p> + <!-- inherited from container --> + <div class="container"> + <form method="POST" enctype="multipart/form-data"> + <label for="text">First name:</label> + <input type="text" id="text" name="text"> + <label for="cars">Choose a car:</label> + <select id="cars" name="cars"> + <option value="volvo">Volvo</option> + <option value="saab">Saab</option> + <option value="fiat">Fiat</option> + <option value="audi">Audi</option> + </select> + <textarea name="message" rows="4" cols="30"> + The cat was playing in the garden. + </textarea> + <input type="submit" id="submit" name="submit" value="Submit!"> + <input type="reset" id="reset" name="reset" value="Reset!"> + <input type="file" id="file" name="file" value="Select file..."> + <label> + <input type="checkbox" id="checkbox" name="checkbox" value=""> + Select me! + </label> + <input type="hidden" id="hidden" name="hidden" value="Hidden value"> + <button>Hello</button> + </form> + </div> + <hr> + <p>The ones below are outside the form</p> + <input style="display: none" type="text" name="out-text"> + <hr> + </body> +</html> diff --git a/test/html/render/form-display-none.ref.html b/test/html/render/form-display-none.ref.html new file mode 100644 index 00000000..a8e43c1b --- /dev/null +++ b/test/html/render/form-display-none.ref.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> + <head> + <title>Test form inputs with display:none</title> + <style> + /* * { border: solid 1px blue; margin: 5px; padding: 5px; } */ + </style> + </head> + <body> + <hr> + <p>There are some elements below, but you shouldn't see any. Disable CSS to + see them.</p> + <hr> + <p>The ones below are outside the form</p> + <hr> + </body> +</html> |