blob: 7e839f5a1b8b17244ce2c66d6f045da30a168ccb [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/polyfill.js"></script>
<script src="../resources/event-sender-util.js"></script>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<div id="host"></div>
<pre id="console"></pre>
<script>
function createBox(name) {
var div = document.createElement('div');
div.style.width = '100px';
div.style.height = '100px';
div.addEventListener('drop', function(e) {
debug('PASS: drop event is fired.');
});
return div;
}
var shadowRoot = host.webkitCreateShadowRoot();
var div = document.createElement('div');
shadowRoot.appendChild(div);
var darkRoot = div.webkitCreateShadowRoot();
var box = createBox('dark');
darkRoot.appendChild(box);
var x = box.offsetLeft + box.offsetWidth / 2;
var y = box.offsetTop + box.offsetHeight / 2;
var element = document.elementFromPoint(x, y);
shouldBe("internals.treeScopeRootNode(element)", "document");
var successfullyParsed = true;
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>