<html>
<body>

<script>
var w = window.open('does_not_exist.html');
if (!w) {
  alert("success:w is null");
}
else {
  alert("failure:w is not null -- " + w);
}
alert("finish");
</script>

</body>
</html>