chromium/third_party/blink/web_tests/http/tests/svg/dynamic-image-root.svg

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <script>
	  if (window.testRunner) {
		testRunner.waitUntilDone();
		testRunner.dumpAsText();
	  }

	  window.onload = function() {
        if (window.testRunner)
          testRunner.notifyDone();
	  };
  </script>
  <text y="170" x="20" id="console">Result: </text>
  <script>
      var img = document.createElementNS("http://www.w3.org/2000/svg", "image");
      img.x.baseVal.value = 20;
      img.y.baseVal.value = 20;
      img.width.baseVal.value = 100;
      img.height.baseVal.value = 100;
      img.addEventListener("load", loaded, false);
      img.addEventListener("SVGLoad", loaded, false);
      img.addEventListener("error", loaded, false);
      img.addEventListener("SVGError", loaded, false);
      img.href.baseVal = "http://127.0.0.1:8000/svg/resources/delayCachedLoad.php";
      document.documentElement.appendChild(img);

      function loaded(evt) {
		document.getElementById("console").textContent += evt.type + "(" + evt.target + ") ";
      }
  </script>
</svg>