summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/svg/text/reftests/gradient-after-reposition.html
blob: 850b0eb91d3f8c483fb2902cb41d5ed6342006d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<link rel="match" href="gradient-after-reposition-ref.html">
<link rel="help" href="https://crbug.com/1274630">
<body>
<svg style="border: 1px solid gray;">
  <defs>
    <linearGradient id="testGradient">
      <stop stop-color="#000000" offset="0%"/>
      <stop stop-color="#000000" offset="50%"/>
      <stop stop-color="#3dcd58" offset="50%"/>
      <stop stop-color="#ff4a4a" offset="100%"/>
    </linearGradient>
  </defs>
  <text id="test" fill="url(#testGradient)" x="25" y="50" font-weight="bold" font-size="40">
  Test gradient</text>
</svg>

<script>
requestAnimationFrame(() => {
  requestAnimationFrame(() => {
    const text  = document.getElementById('test');
    text.setAttribute('x', '50');
    document.documentElement.classList.remove('reftest-wait');
  });
});
</script>
</body>
</html>