Skip to content

Commit

Permalink
Add test about inline images with no size
Browse files Browse the repository at this point in the history
Related to #901.
  • Loading branch information
liZe committed Jul 25, 2019
1 parent 7efd1e1 commit fb90a73
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions weasyprint/tests/test_layout/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,26 @@ def test_images_16():
assert img.height == 200


@assert_no_logs
def test_images_17():
page, = parse('''
<div style="width: 300px; height: 300px">
<img src="
data:image/svg+xml,
<svg viewBox='0 0 20 10'></svg>
">''')
html, = page.children
body, = html.children
div, = body.children
line, = div.children
img, = line.children
assert div.width == 300
assert div.height == 300
assert img.element_tag == 'img'
assert img.width == 300
assert img.height == 150


@assert_no_logs
def test_linear_gradient():
red = (1, 0, 0, 1)
Expand Down

0 comments on commit fb90a73

Please sign in to comment.