Commit 3b059937 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Add a test for an svg img with external resources.

It is perhaps not super clear from the spec, but the Note in [1] talks
about: "single-page vector documents (single-page PDFs, XML files with
an SVG document element)". This CL adds a test that checks that
external resources are not loaded for SVG documents used as an img
source.

This matches the behavior of Firefox and Chrome, at least.

[1] https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element

Change-Id: I9ab713b24fdea5b7d98c5ca6463de4c3674fb8fc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2041595
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#738941}
parent b28edfcf
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<style xmlns="http://www.w3.org/1999/xhtml">:root { background-color: green }</style>
<link xmlns="http://www.w3.org/1999/xhtml" rel="stylesheet" type="text/css" href="red-bg.css" />
</svg>
<!doctype html>
<title>Test reference</title>
<p>You should see a green square below.</p>
<div style="background:green;width:100px;height:100px"></div>
<!doctype html>
<title>An img element with an svg src should not load external resources from the svg file.</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element">
<link rel="match" href="svg-img-with-external-stylesheet-ref.html">
<p>You should see a green square below.</p>
<img width="100" height="100" src="support/external-sheet.svg">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment