chromium/third_party/blink/web_tests/svg/custom/svg2-loadevents-capturing.svg

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

      var results = [ ];
      function handler(event)
      {
        results.push(event.target.localName);
      }
      document.documentElement.addEventListener('load', handler, true);

      function reportResults()
      {
        var console = document.getElementById("console");
        var expected = [ "image", "svg" ];
        for (var i = 0; i < expected.length; ++i) {
            if (results[i] != expected[i]) {
              console.appendChild(document.createTextNode("FAIL: " + i + " should be " + expected[i] + " but instead is " + results[i] + ".\n"));
              return;
            }
        }
        console.appendChild(document.createTextNode("Passed"));
      }
      document.documentElement.addEventListener('load', reportResults);
    ]]>
  </script>
  <g>
    <image id="image" width="100" height="100" xlink:href="resources/green-checker.png" />
    <text y="130" x="20">This tests that load dispatching works when there are no</text>
    <text y="150" x="20">direct listeners, but there are capturing event listeners on an ancestor.</text>
    <text y="170" x="20" id="console" />
  </g>
</svg>