summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/animations/stop-animation-01.html
blob: d240c51142abb4e96d88b9bcc341c03d70d9d3ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!doctype html>
<html class="reftest-wait">
<title>Animate a &lt;stop> element</title>
<link rel="match" href="../struct/reftests/reference/green-100x100.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<script>
function test() {
  waitForAtLeastOneFrame().then(takeScreenshot);
}
</script>
<svg>
  <linearGradient id="g">
    <stop stop-color="red">
      <animate attributeName="stop-color" values="red; green" dur="1s"
               keyTimes="0; 0.01" fill="freeze" calcMode="discrete"
               onbegin="test()"/>
    </stop>
  </linearGradient>
  <rect width="100" height="100" fill="url(#g)"/>
</svg>