summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/getter-on-window-object.html
blob: 8e4200b23e24bf781b4147a351d4c8935fadbd7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<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>