Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / svg2-loadevents-capturing.svg
blob93eced7cd3e8c45b52ab6224cd29944d0d3be34f
1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2 <script>
3 <![CDATA[
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 var results = [ ];
8 function handler(event)
10 results.push(event.target.localName);
12 document.documentElement.addEventListener('load', handler, true);
14 function reportResults()
16 var console = document.getElementById("console");
17 var expected = [ "image", "svg" ];
18 for (var i = 0; i < expected.length; ++i) {
19 if (results[i] != expected[i]) {
20 console.appendChild(document.createTextNode("FAIL: " + i + " should be " + expected[i] + " but instead is " + results[i] + ".\n"));
21 return;
24 console.appendChild(document.createTextNode("Passed"));
26 document.documentElement.addEventListener('load', reportResults);
27 ]]>
28 </script>
29 <g>
30 <image id="image" width="100" height="100" xlink:href="resources/green-checker.png" />
31 <text y="130" x="20">This tests that load dispatching works when there are no</text>
32 <text y="150" x="20">direct listeners, but there are capturing event listeners on an ancestor.</text>
33 <text y="170" x="20" id="console" />
34 </g>
35 </svg>