blob: a523b1220b0228a92b8f5389b3c1783f1644eeda [file] [log] [blame]
<html>
<head>
<script>
function doTest()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
// Test calling bridged function with global window as "this"
var f = ("layoutTestController" in window) ? objCController.className : console.log;
var result;
try {
f("goodbye cruel world");
result = "No Exception";
} catch (e) {
result = e.name;
}
var output = document.getElementById("test1");
output.innerHTML = result + ": " + f;
var notAruntimeObject = { __apple_runtime_object:1 };
notAruntimeObject.f = f;
var result;
try {
notAruntimeObject.f("goodbye cruel world");
result = "No Exception";
} catch (e) {
result = e.name;
}
output = document.getElementById("test2");
output.innerHTML = result + ": " + f;
}
</script>
</head>
<body onload="doTest();">
<div id=test1>
<span style="color: red;">Test 1 FAILED: This is testing...</span>
</div>
<div id=test2>
<span style="color: red;">Test 2 FAILED: This is testing...</span>
</div>
</body>
</html>