<!DOCTYPE html>
<html>
<script src="full-screen-test.js"></script>
<body onload="init()">
<p>Test passes if it does not crash.</p>
<div id="div1">
<script>
var init = function() {
    // Bail out early if the full screen API is not enabled or is missing:
    if (Element.prototype.webkitRequestFullScreen == undefined) {
        logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
        endTest();
    } else {
        runWithKeyDown(function() { div1.webkitRequestFullScreen() });        
    }
    
    frameset1 = document.createElementNS("http://www.w3.org/1999/xhtml", "frameset");
    document.body.appendChild(frameset1);
    setTimeout("crash()", 0);
};

function crash() {
    frameset1.appendChild(div1);
	if (window.eventSender)
        eventSender.keyDown("X");
    endTest();
}
</script>
</html>
