| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400" onload="startup()"> |
| <defs id="defs"> |
| <cursor id="cursor1" xlink:href="data:image/png;base64,"/> |
| <cursor id="cursor2" xlink:href="data:image/png;base64,"/> |
| </defs> |
| |
| <script> |
| <![CDATA[ |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| gc = function(){window.GCController.collect()}; |
| } else if (!window.gc) |
| gc = function(){}; |
| |
| var outer; |
| var inner; |
| |
| function startup() { |
| outer = document.getElementById("outer"); |
| inner = document.getElementById("inner"); |
| |
| if (location.hash != "#3") { |
| if (location.hash) |
| location.hash = "#" + (parseInt(location.hash.slice(1)) + 1).toString(); |
| else |
| location.hash = "#1"; |
| setTimeout(step1, 0); |
| } else { |
| gc(); |
| inner.setAttribute('fill', "green"); |
| while (inner.firstChild) |
| inner.removeChild(inner.firstChild); |
| inner.appendChild(document.createTextNode("PASS: Successfully changed cursors.")); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| } |
| |
| function step1() { |
| outer.setAttribute('cursor', "url('#cursor2')"); |
| inner.removeAttribute('cursor'); |
| setTimeout(step2, 0); |
| } |
| |
| function step2() { |
| outer.removeAttribute('cursor'); |
| setTimeout(function(){location.reload()}, 0); |
| } |
| |
| |
| //]]> |
| </script> |
| |
| <g id="outer"> |
| <text x="20" y="20" fill="red" id="inner" cursor="url('#cursor1')">X</text> |
| </g> |
| </svg> |