<html>
<head>
<script>
function runTest() {
    if (!window.objCPlugin)
        return document.write('FAIL - no objCPlugin');
        
    objCPlugin.removeBridgeRestrictions_(window);
    if (!window.objc)
        return document.write('FAIL - no window.objc');
    
    var myURL = document.URL;    
    var resourceURL = myURL.replace('pasteboard/5583362.html','resources/plaintext-pasteboard-data.dat');
    var data = objc('NSData').dataWithContentsOfURL_(objc('NSURL').URLWithString_(resourceURL));
    
    var pasteboard = objc('NSPasteboard').generalPasteboard();
    var pasteboardType = 'NSStringPboardType';
    
    pasteboard.declareType_owner_(pasteboardType, 0);
    pasteboard.setData_forType_(data, pasteboardType);
    
    document.body.focus();
    document.execCommand("Paste");
}
</script>
</head>
<body contenteditable="true"><script>runTest();</script></body>
</html>
