<html>
<head>
<script>
function test() {
if (document.body.getAttribute('test') == 'pass')
window.opener.pass();
else
window.opener.fail();
}
</script>
</head>
<body onload="test()" test="pass"></body>
</html>