blob: 05ae7f5daad4dfe60e9f4f9d5c993ff2d301aa48 [file] [log] [blame]
<html>
<body onload="test()">
<iframe src='data:text/html,<a id="a" href="#" onclick="document.write(window != top ? &apos;<p>FAIL</p>&apos; : &apos;<p>PASS</p>&apos;); return false">link</a>'></iframe>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function test()
{
var doc = frames[0].document;
var range=doc.createRange();
range.selectNodeContents(doc.body);
var frag=range.extractContents();
document.body.appendChild(frag);
var event = top.document.createEvent('MouseEvent');
event.initEvent('click', true, true);
top.document.getElementsByTagName('a')[0].dispatchEvent(event);
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</body>
</html>