Add specs for the beforeunload handler.

This commit is contained in:
Cheng Zhao 2013-09-02 16:28:36 +08:00
parent e423f601c0
commit cfb957a603
5 changed files with 91 additions and 3 deletions

View file

@ -0,0 +1,13 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
window.onbeforeunload = function() {
setImmediate(function() {
require('remote').getCurrentWindow().emit('onbeforeunload');
});
return 'string';
}
window.close();
</script>
</body>
</html>