wpt / css / css-images / svg-script-is-ignored.html

Status: FAIL | Duration: 8ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-images/svg-script-is-ignored.html

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>CSS Image Test: SVG used as an image does not execute any script</title>
    <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
    <link rel="help" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element">
    <link rel="help" href="https://w3c.github.io/svgwg/svg2-draft/single-page.html#conform-referencing-modes">
    <link rel="match" href="svg-script-is-ignored-ref.svg">
    <style>
      * {
        padding: 0px;
        margin: 0px;
      }
    </style>
  </head>
  <body>
    <img src="support/scripted.svg"/>
  </body>
</html>

/css/css-images/svg-script-is-ignored-ref.svg

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500">
  <g>
    <rect id="svg-rect" x="0" y="0" width="100" height="100" fill="green"></rect>
    <foreignObject x="0" y="100" width="100" height="100">
     <html xmlns="http://www.w3.org/1999/xhtml">
      <div id="html-rect" style="background-color: green; width: 100px; height: 100px;"/>
     </html>
    </foreignObject>
  </g>
</svg>