<html> | |
<body> | |
<div id="result"></div> | |
<script> | |
if (window.layoutTestController) | |
{ | |
layoutTestController.dumpAsText(); | |
layoutTestController.setCanOpenWindows(); | |
layoutTestController.grantDesktopNotificationPermission("file://"); | |
layoutTestController.waitUntilDone(); | |
} | |
if (!window.webkitNotifications) { | |
log("FAIL: No webkitNotifications interface!"); | |
} | |
var target = window.open("about:blank"); | |
var notification = target.webkitNotifications; | |
target.location.reload(); | |
var timer = setInterval("crash()", 60); | |
setTimeout("finish()", 100); | |
function crash() | |
{ | |
var a = []; | |
for (var i = 0; i < 0x100; i++) | |
{ | |
try | |
{ | |
a.push(new WebGLByteArray()); | |
} | |
catch (e) {} | |
a.push(Array(i).join("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")); | |
} | |
delete a; | |
notification.requestPermission(); | |
} | |
function finish() | |
{ | |
clearInterval(timer); | |
document.getElementById("result").innerHTML = "PASS"; | |
target.close(); | |
if (window.layoutTestController) | |
layoutTestController.notifyDone(); | |
} | |
</script> | |
</body> | |
</html> | |