1 <svg xmlns=
"http://www.w3.org/2000/svg" xmlns:
xlink=
"http://www.w3.org/1999/xlink" onload=
"loaded(evt); testDone();">
2 <text y=
"170" x=
"20" id=
"console">Test didn't run.
</text>
4 if (window.testRunner) {
5 testRunner.waitUntilDone();
6 testRunner.dumpAsText();
9 var results = new Array();
11 function loaded(evt) {
12 results.push(evt.type +
"(" + evt.target +
")");
16 if ( results.length !=
2 ||
17 results[
0] !=
"load([object SVGImageElement])" ||
18 results[
1] !=
"load([object SVGSVGElement])") {
19 document.getElementById(
"console").textContent =
"Failed - got " + results.join(
", ");
21 document.getElementById(
"console").textContent =
"Passed";
24 if (window.testRunner)
25 testRunner.notifyDone();
28 var img = document.createElementNS(
"http://www.w3.org/2000/svg",
"image");
29 img.setAttribute(
"x",
20);
30 img.setAttribute(
"y",
20);
31 img.setAttribute(
"width",
100);
32 img.setAttribute(
"height",
100);
33 img.addEventListener(
"load", loaded, false);
34 img.addEventListener(
"SVGLoad", loaded, false);
35 img.addEventListener(
"error", loaded, false);
36 img.addEventListener(
"SVGError", loaded, false);
37 img.setAttributeNS(
"http://www.w3.org/1999/xlink",
"xlink:href",
"http://127.0.0.1:8000/svg/resources/delayCachedLoad.php");
38 document.documentElement.appendChild(img);