Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / svg / dynamic-image-root.svg
blobb35af561d0c7ee7e1c2d3c72e565fc99f2396720
1 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2 <script>
3 if (window.testRunner) {
4 testRunner.waitUntilDone();
5 testRunner.dumpAsText();
8 window.onload = function() {
9 if (window.testRunner)
10 testRunner.notifyDone();
12 </script>
13 <text y="170" x="20" id="console">Result: </text>
14 <script>
15 var img = document.createElementNS("http://www.w3.org/2000/svg", "image");
16 img.x.baseVal.value = 20;
17 img.y.baseVal.value = 20;
18 img.width.baseVal.value = 100;
19 img.height.baseVal.value = 100;
20 img.addEventListener("load", loaded, false);
21 img.addEventListener("SVGLoad", loaded, false);
22 img.addEventListener("error", loaded, false);
23 img.addEventListener("SVGError", loaded, false);
24 img.href.baseVal = "http://127.0.0.1:8000/svg/resources/delayCachedLoad.php";
25 document.documentElement.appendChild(img);
27 function loaded(evt) {
28 document.getElementById("console").textContent += evt.type + "(" + evt.target + ") ";
30 </script>
31 </svg>