OLD | NEW |
1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k"> | 1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlin
k"> |
2 <script> | 2 <script> |
3 <![CDATA[ | 3 <![CDATA[ |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
6 | 6 |
7 var results = [ ]; | 7 var results = [ ]; |
8 function handler(event) | 8 function handler(event) |
9 { | 9 { |
10 results.push(event.target.localName); | 10 results.push(event.target.localName); |
11 } | 11 } |
12 document.documentElement.addEventListener('load', handler, true); | 12 document.documentElement.addEventListener('load', handler, true); |
13 | 13 |
14 function reportResults() | 14 function reportResults() |
15 { | 15 { |
16 var console = document.getElementById("console"); | 16 var console = document.getElementById("console"); |
17 var expected = [ "image", "text", "text", "text", "g", "svg" ]; | 17 var expected = [ "image", "text", "text", "text", "g", "svg" ]; |
18 for (var i = 0; i < expected.length; ++i) { | 18 for (var i = 0; i < expected.length; ++i) { |
19 if (results[i] != expected[i]) { | 19 if (results[i] != expected[i]) { |
20 console.appendChild(document.createTextNode("FAIL: " + i + " shoul
d be " + expected[i] + " but instead is " + results[i] + ".\n")); | 20 console.appendChild(document.createTextNode("FAIL: " + i + " shoul
d be " + expected[i] + " but instead is " + results[i] + ".\n")); |
21 return; | 21 return; |
22 } | 22 } |
23 } | 23 } |
24 console.appendChild(document.createTextNode("Passed")); | 24 console.appendChild(document.createTextNode("Passed")); |
25 } | 25 } |
26 document.documentElement.addEventListener('load', reportResults); | 26 document.documentElement.addEventListener('load', reportResults); |
27 ]]> | 27 ]]> |
28 </script> | 28 </script> |
29 <g> | 29 <g> |
30 <image externalResourcesRequired="false" id="image" width="100" height="100"
xlink:href="resources/green-checker.png" /> | 30 <image id="image" width="100" height="100" xlink:href="resources/green-check
er.png" /> |
31 <text y="130" x="20">This tests that load dispatching works when there are n
o</text> | 31 <text y="130" x="20">This tests that load dispatching works when there are n
o</text> |
32 <text y="150" x="20">direct listeners, but there are capturing event listene
rs on an ancestor. Bug 16447</text> | 32 <text y="150" x="20">direct listeners, but there are capturing event listene
rs on an ancestor. Bug 16447</text> |
33 <text y="170" x="20" id="console" /> | 33 <text y="170" x="20" id="console" /> |
34 </g> | 34 </g> |
35 </svg> | 35 </svg> |
OLD | NEW |