<html>
<head></head>
<body>
<p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=48953">bug 48953</a>:
Can't shadow/overwrite window.constructor.</p>
<div id="console"></div>
<script>
if (window.testRunner) {
    window.testRunner.dumpAsText();
}

function log(message, color)
{
    var paragraph = document.createElement("div");
    paragraph.appendChild(document.createTextNode(message));
    paragraph.style.fontFamily = "monospace";
    if (color)
    paragraph.style.color = color;
    document.getElementById("console").appendChild(paragraph);
}

var testName = "Can replace window constructor"
var newConstructor = "MyConstructor";
var constructor = newConstructor;

if ((constructor == newConstructor) && (window.constructor == newConstructor))
    log(testName + ": PASS", "green");
else
    log(testName + ": FAIL", "red");

</script>
</body>
</html>
