blob: 1db1fa654b6812b0604648d5f71efccc93003d3b [file] [log] [blame]
<html>
<script>
function runTest()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
var plugin = document.getElementById("testPlugin");
var result = document.getElementById('result');
var o = { stringProperty : 'foo', nullProperty : null, undefinedProperty : undefined };
if (!plugin.testGetPropertyReturnValue(o, 'stringProperty')) {
result.innerHTML = "FAILURE: getting stringProperty returned false";
return;
}
if (!plugin.testGetPropertyReturnValue(o, 'nullProperty')) {
result.innerHTML = "FAILURE: getting nullProperty returned false";
return;
}
if (!plugin.testGetPropertyReturnValue(o, 'undefinedProperty')) {
result.innerHTML = "FAILURE: getting undefinedProperty returned false";
return;
}
if (!plugin.testGetPropertyReturnValue(o, 'nonExistentProperty')) {
result.innerHTML = "FAILURE: getting undefinedProperty returned false";
return;
}
result.innerHTML = 'SUCCESS';
}
</script>
<body onload="runTest();">
<embed id="testPlugin" type="application/x-webkit-test-netscape" width="200" height="200"></embed>
This tests that we return the correct return value when a plug-in calls NPN_GetProperty.
<div id="result">FAILURE</div>
</body>
</html>