<!DOCTYPE HTML>
<html>
<head>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

function loaded() {
  try {
    window.location.fail();
  } catch(ex) {
    alert("Yay! Calling a function that shouldn't exist threw an exception.");
  }
}

</script>
</head>
<body onload="loaded()">
This test passes if it doesn't alert the string "fail".
<iframe src="http://127.0.0.1:8080/security/resources/location-prototype-overwrite.html"></iframe>
</body>
</html>
