| <p>Tests for tapping on a text node assigned to a slot. touchstart should fire on the slot.</p> |
| <div id="target">Tap here</div> |
| <script src="../../resources/ui-helper.js"></script> |
| var target = document.getElementById('target'); |
| var result = document.getElementById('result'); |
| let shadowRoot = target.attachShadow({mode: 'closed'}); |
| shadowRoot.innerHTML = `<span><slot></slot></span>`; |
| shadowRoot.querySelector('span').addEventListener('touchstart', (event) => { |
| result.textContent = 'PASS'; |
| UIHelper.wait(UIHelper.tapAt(target.offsetLeft + 5, target.offsetTop + 5).then(() => { |
| result.textContent = 'FAIL'; |