Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / gradient-attr-update.svg
blob5b1e36d1da07118f977c93b370e7937508f4475c
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
3 <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" onload="pageLoaded()">
4 <script>
5 if (window.testRunner)
6 window.testRunner.waitUntilDone();
8 function myfunc() {
9 var myRect = document.getElementById("rect");
10 myRect.setAttributeNS(null, 'fill', "url(#gradient1)");
11 var myStop = document.getElementById("OF");
12 myStop.setAttributeNS(null, 'stop-color', 'green');
13 if (window.testRunner)
14 testRunner.notifyDone();
17 function clickNow() {
18 if (window.eventSender) {
19 eventSender.mouseMoveTo(20, 10);
20 eventSender.mouseDown();
21 eventSender.mouseUp();
25 function pageLoaded() {
26 if (window.eventSender)
27 clickNow();
28 else
29 myfunc();
31 </script>
32 <defs>
33 <radialGradient id="gradient1" cx="45%" cy="48%" r="200" fx="50%" fy="52%" spreadMethod="reflect" gradientUnits="userSpaceOnUse">
34 <stop offset="0.0" stop-color="green"/>
35 <stop id="OF" offset="1" stop-color="red"/>
36 </radialGradient>
37 </defs>
38 <rect id="rect" x="0" y="0" width="100" height="100" fill="red" onclick="myfunc()"/>
39 </svg>