From 24ea78c6133a437eabc31630b0642fa36d8a5a00 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 20 May 2023 17:54:03 +0200 Subject: [PATCH] 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. --- Tests/LibWeb/Layout/expected/svg/svg-as-image.txt | 4 ++++ Tests/LibWeb/Layout/input/svg/rectangle.svg | 3 +++ Tests/LibWeb/Layout/input/svg/svg-as-image.html | 1 + 3 files changed, 8 insertions(+) create mode 100644 Tests/LibWeb/Layout/expected/svg/svg-as-image.txt create mode 100644 Tests/LibWeb/Layout/input/svg/rectangle.svg create mode 100644 Tests/LibWeb/Layout/input/svg/svg-as-image.html diff --git a/Tests/LibWeb/Layout/expected/svg/svg-as-image.txt b/Tests/LibWeb/Layout/expected/svg/svg-as-image.txt new file mode 100644 index 0000000000..0592f36d88 --- /dev/null +++ b/Tests/LibWeb/Layout/expected/svg/svg-as-image.txt @@ -0,0 +1,4 @@ +Viewport <#document> at (0,0) content-size 800x600 children: not-inline + BlockContainer at (0,0) content-size 800x1584 [BFC] children: not-inline + BlockContainer at (8,8) content-size 784x1568 children: not-inline + ImageBox at (8,8) content-size 784x1568 children: not-inline 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 @@ + + + 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 @@ + \ No newline at end of file