blob: 263a62592bb2ee22e01221fb6ff8745ff5e39c19 [file] [log] [blame]
<!DOCTYPE HTML>
<body>
Test for crbug.com/370136: event targets should not be nodes in the shadow tree.<br>
FAIL
<template id="template">
<svg width="100" height="100">
<rect id="FAIL" width="100" height="100" fill="green" />
</svg>
</template>
<div id="host"></div>
<script>
var host = document.querySelector('#host');
var shadowRoot = host.createShadowRoot();
var template = document.querySelector('template');
shadowRoot.appendChild(template.content.cloneNode(true));
host.addEventListener('click', function(e) {
if (e.target.id == 'host')
document.body.innerHTML = 'PASS';
});
if (window.eventSender) {
eventSender.mouseMoveTo(100, 100);
eventSender.mouseDown();
eventSender.mouseUp();
}
</script>
</body>