wpt / svg / coordinate-systems / viewBox-baseVal-change-invalid.html

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

/svg/coordinate-systems/viewBox-baseVal-change-invalid.html

<!doctype HTML>
<title>viewBox.baseVal dynamically changes to invalid value</title>
<link rel="help" href="https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute">
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
<svg id="svg" style="height: 200px; width: 200px;" viewBox="0 0 100 100">
  <rect width="100" height="100" fill="green"></rect>
</svg>
<script>
onload = () => {
  // After this, viewBox should be ignored, and the green rect should be 100x100.
  svg.viewBox.baseVal.width = -100;
};
</script>

/svg/struct/reftests/reference/green-100x100.html

<!DOCTYPE html>
<div style="width: 100px; height: 100px; background-color: green"></div>