chromium/third_party/blink/web_tests/http/tests/security/resources/location-prototype-overwrite.html

<!DOCTYPE HTML>
<script>
// Make sure touch top window location first, get the hook to inject function.
window.top.location;

Object.prototype.fail = function() {
  alert('FAIL!');
};
</script>