chromium/chrome/test/data/extensions/api_test/bindings/validation_interception.html

<html>
<script>
var v3 = {};

Object.prototype.__defineGetter__(1, function() {
  return v3;
});

Object.prototype.__defineSetter__(1, function() {
  this[0] = 42;
});

var caught = false;
try {
  chrome.runtime.connect();
} catch (e) {
  caught = true;
  console.warn('Message: ' + e.message);
}

</script>
</html>