summaryrefslogtreecommitdiff
path: root/Tests/LibWeb/Layout/input
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-05-20 17:54:03 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-21 07:44:29 +0200
commit24ea78c6133a437eabc31630b0642fa36d8a5a00 (patch)
tree278c9f5f27d6a5067d7b5cb7a9e109298720919c /Tests/LibWeb/Layout/input
parentb2c899af118e40e3786abde0825ba7f00cc5d248 (diff)
downloadserenity-24ea78c6133a437eabc31630b0642fa36d8a5a00.zip
LibWeb: Add a very basic test for SVG-as-image
This mainly just checks that we load the file and learn the correct intrinsic aspect ratio from the external SVG.
Diffstat (limited to 'Tests/LibWeb/Layout/input')
-rw-r--r--Tests/LibWeb/Layout/input/svg/rectangle.svg3
-rw-r--r--Tests/LibWeb/Layout/input/svg/svg-as-image.html1
2 files changed, 4 insertions, 0 deletions
diff --git a/Tests/LibWeb/Layout/input/svg/rectangle.svg b/Tests/LibWeb/Layout/input/svg/rectangle.svg
new file mode 100644
index 0000000000..038b4a2765
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/svg/rectangle.svg
@@ -0,0 +1,3 @@
+<svg viewBox="0 0 100 200" xmlns="http://www.w3.org/2000/svg">
+ <rect x="0" y="0" width="100" height="200" fill="green" />
+</svg>
diff --git a/Tests/LibWeb/Layout/input/svg/svg-as-image.html b/Tests/LibWeb/Layout/input/svg/svg-as-image.html
new file mode 100644
index 0000000000..6a9f6bfd8a
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/svg/svg-as-image.html
@@ -0,0 +1 @@
+<!doctype html><img src="rectangle.svg" style="display: block"> \ No newline at end of file