blob: d3d84d80ef94528625dd14a3202b56f64e157a40 [file] [log] [blame]
<body>
<script>
function print(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);
}
if (window.layoutTestController)
layoutTestController.dumpAsText();
</script>
<iframe id=i src='about:blank' width=10 height=10>
</iframe>
<div id=console></div>
<script>
var otherWindow = document.getElementById('i').contentWindow;
var closure;
function otherWindowClosure()
{
var localVar = 1;
return otherWindow.eval("(function () { return localVar; })");
}
closure = otherWindowClosure();
print("Test that otherWindow.eval() performs ActivationImp tear-off: " + (closure() == 1 ? "PASS" : "FAIL")) ;
</script>