blob: 493cfb2cc4029c6ae01f54ed8bc3eeb58e7919ec [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<script src="resources/shadow-dom.js"></script>
<script src="resources/event-dispatching.js"></script>
</head>
<body>
<p id="description"></p>
<div id="sandbox"></div>
<pre id="console"></pre>
<script>
var sandbox = document.getElementById('sandbox');
sandbox.appendChild(
createDOM('div', {'id': 'top'},
createDOM('div', {'id': 'shadow-host'},
createShadowRoot())));
var shadowRoot = getNodeInShadowTreeStack('shadow-host/');
shadowRoot.id = 'shadow-root';
shadowRoot.innerHTML = 'Text Nodes';
addEventListeners(['top', 'shadow-host', 'shadow-host/']);
showSandboxTree();
// Calculates the position of the text node in the shadow root.
var host = document.getElementById('shadow-host');
var x = host.offsetLeft + 5;
var y = host.offsetTop + defaultPaddingSize + 5;
debug('\n' + 'Moving mouse from a direct child text node of the shadow root to top');
eventSender.mouseMoveTo(x, y);
clearEventRecords();
moveMouseOver(document.getElementById('top'));
debugDispatchedEvent('mouseout');
debugDispatchedEvent('mouseover');
touchLocation(host);
debugDispatchedEvent('touchstart');
scrollMouseWheel(host);
debugDispatchedEvent('mousewheel');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>