WebCore:
[WebKit-https.git] / LayoutTests / editing / pasteboard / 5583362.html
1 <html>
2 <head>
3 <script>
4 function runTest() {
5     if (!window.objCPlugin)
6         return document.write('FAIL - no objCPlugin');
7         
8     objCPlugin.removeBridgeRestrictions_(window);
9     if (!window.objc)
10         return document.write('FAIL - no window.objc');
11     
12     var myURL = document.URL;    
13     var resourceURL = myURL.replace('pasteboard/5583362.html','resources/plaintext-pasteboard-data.dat');
14     var data = objc('NSData').dataWithContentsOfURL_(objc('NSURL').URLWithString_(resourceURL));
15     
16     var pasteboard = objc('NSPasteboard').generalPasteboard();
17     var pasteboardType = 'NSStringPboardType';
18     
19     pasteboard.declareType_owner_(pasteboardType, 0);
20     pasteboard.setData_forType_(data, pasteboardType);
21     
22     document.body.focus();
23     document.execCommand("Paste");
24 }
25 </script>
26 </head>
27 <body contenteditable="true"><script>runTest();</script></body>
28 </html>