blob: 1c4d81e0ca41326389b42ab40df18e25729ba827 [file] [log] [blame]
<html>
<head><title> simple.html </title>
<script>
function print(message) {
var paragraph = document.createElement('p');
paragraph.appendChild(document.createTextNode(message));
document.getElementById('console').appendChild(paragraph);
}
function test() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
if (!window.objCPlugin)
return print('FAIL - no objCPlugin');
objCPlugin.removeBridgeRestrictions_(window);
if (!window.objc)
return print('FAIL - no window.objc');
// test creating an obj-c object
var NSCell = objc('NSCell');
print('got class: ' + NSCell);
var cell = NSCell.alloc().init().autorelease();
print('created object: <' + cell.className() + '>');
cell.setValue_forKey_('zoe', 'stringValue');
print('set string value: ' + cell.stringValue());
if (cell.stringValue() == 'zoe')
print('PASS');
else
print('FAIL');
}
</script>
</head>
<body onload="test();">
<div id='console'/>
</body>
</html>