blob: 6742db12cbf726e3050910d03ff1b7125bd8363f [file] [log] [blame]
<html>
<head>
<script>
function debug(str) {
var d = document.getElementById('console');
d.appendChild(document.createTextNode(str + '\n'));
}
function handler(event) {
success = true;
}
function runTests() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var b = document.getElementById('theButton')
b.addEventListener('click', handler, true);
success = false;
b.click();
if (success)
debug("SUCCESS")
else
debug("FAILURE: event handler wasn't called")
}
</script>
</head>
<body onload="runTests();">
This tests that capturing event listeners will be invoked by events dispatched to the target which it has been added to.
<input id="theButton" type="button">
<pre id="console">
</pre>
</body>
</html>