blob: 31276341246cb76aae1453540debc16b52271f25 [file] [log] [blame]
<html>
<script>
var frame;
if (!window.gc) {
window.gc = function() {
if (window.GCController)
return GCController.collect();
for (var i = 0; i < 10000; i++) {
var s = new String("abc");
}
}
}
function done() {
document.body.innerHTML = 'PASS: handler not supported or did not crash when removing Windows during ondeviceorientation event';
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function remove() {
frame = null;
document.body.innerHTML = '';
gc();
setTimeout(done, 0);
}
function crash() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
frame = document.createElement('iframe');
document.body.appendChild(frame);
if (!frame.contentWindow.ondeviceorientation)
done();
else
frame.contentWindow.ondeviceorientation = remove;
}
</script>
<body onload="crash()">
</body>
</html>