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.
This commit is contained in:
parent
b2c899af11
commit
24ea78c613
Notes:
sideshowbarker
2024-07-16 20:39:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/24ea78c613 Pull-request: https://github.com/SerenityOS/serenity/pull/18943 Reviewed-by: https://github.com/winfr34k
3 changed files with 8 additions and 0 deletions
4
Tests/LibWeb/Layout/expected/svg/svg-as-image.txt
Normal file
4
Tests/LibWeb/Layout/expected/svg/svg-as-image.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x1584 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x1568 children: not-inline
|
||||
ImageBox <img> at (8,8) content-size 784x1568 children: not-inline
|
3
Tests/LibWeb/Layout/input/svg/rectangle.svg
Normal file
3
Tests/LibWeb/Layout/input/svg/rectangle.svg
Normal file
|
@ -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>
|
After Width: | Height: | Size: 133 B |
1
Tests/LibWeb/Layout/input/svg/svg-as-image.html
Normal file
1
Tests/LibWeb/Layout/input/svg/svg-as-image.html
Normal file
|
@ -0,0 +1 @@
|
|||
<!doctype html><img src="rectangle.svg" style="display: block">
|
Loading…
Add table
Reference in a new issue