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

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="loaded(evt); testDone();">
  <text y="170" x="20" id="console">Test didn't run.</text>
  <script>
      if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
      }

      var results = new Array();

      function loaded(evt) {
        results.push(evt.type + "(" + evt.target + ")");
      }

      function testDone() {
        if ( results.length != 2 ||
             results[0] != "load([object SVGImageElement])" ||
             results[1] != "load([object SVGSVGElement])") {
          document.getElementById("console").textContent = "Failed - got " + results.join(", ");
        } else {
          document.getElementById("console").textContent = "Passed";
        }

        if (window.testRunner)
          testRunner.notifyDone();
      }

      var img = document.createElementNS("http://www.w3.org/2000/svg", "image");
      img.setAttribute("x", 20);
      img.setAttribute("y", 20);
      img.setAttribute("width", 100);
      img.setAttribute("height", 100);
      img.addEventListener("load", loaded, false);
      img.addEventListener("SVGLoad", loaded, false);
      img.addEventListener("error", loaded, false);
      img.addEventListener("SVGError", loaded, false);
      img.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", "http://127.0.0.1:8000/svg/resources/delayCachedLoad.php");
      document.documentElement.appendChild(img);
  </script>
</svg>