<html>
<script>
function runTest() {
if (window.testRunner)
testRunner.dumpAsText();
window.__defineGetter__("foo", function() { return "bar"; });
if (window.foo == "bar")
document.getElementById('result').innerHTML = 'SUCCESS';
}
</script>
<body onload="runTest()">
<div>This tests that defining a getter on the window object and then invoking it returns the correct value and doesn't cause an assertion failure.
<div id="result">FAILURE</div>
</body>
</html>