blob: 13e8d9c0cc13aa6936b5aaf8c60deb0d936e3a7b [file] [log] [blame]
<script>
if (window.testRunner)
testRunner.dumpAsText();
// The 'this' value provided to this method, and provided by this method to 'bar', should
// both be the containing window object.
function foo(childThis) {
bar(childThis, this);
}
function bar(childThis, parentThis) {
var result = "PASS";
if (childThis != frames[0])
result = "FAIL";
if (parentThis != window)
result = "FAIL";
if (this != window)
result = "FAIL";
dump(result);
}
function dump(str)
{
document.getElementById("output").innerText = str;
}
</script>
<div>This test checks whether cross-site calling uses the proper
object as the global "this" value. The text below should say
PASS:</div>
<div id="output"> </div>
<iframe src="resources/cross-site-this-helper.html"></iframe>