| <p>Test passes if you see a single 100px by 100px green box below.</p> |
| <div id="host" style="width: 100px; height: 100px;"></div> |
| <rect id="rect" width="50" height="100" fill="red" /> |
| <svg viewbox="0 0 100 100" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| <rect width="50" height="100" fill="green" /> |
| <rect id="rect" width="50" height="100" fill="green" /> |
| <animate attributeName="x" from="0" to="50" dur="0.01s" fill="freeze" xlink:href="#rect" /> |
| testRunner.waitUntilDone(); |
| const shadowRoot = host.attachShadow({mode: 'closed'}); |
| shadowRoot.appendChild(document.querySelector('template').content.cloneNode(true)); |
| requestAnimationFrame(() => { |
| requestAnimationFrame(() => testRunner.notifyDone()); |
| }, 20); // 0.01s is 10ms. Wait for twice that time to be safe. |