Change test to match the results landed in r29424. The test changes were
[WebKit-https.git] / LayoutTests / editing / pasteboard / paste-RTFD.html
1 <html>
2 <head>
3 <style>
4 .editing { 
5     border: 2px solid red; 
6     padding: 12px; 
7     font-size: 24px; 
8 }
9 </style>
10 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
11 <script>
12
13 function print(message) {
14     var paragraph = document.createElement('p');
15     paragraph.appendChild(document.createTextNode(message));
16     document.getElementById('console').appendChild(paragraph);
17 }
18
19 function editingTest() {
20     if (!window.objCPlugin)
21         return print('FAIL - no objCPlugin');
22
23     objCPlugin.removeBridgeRestrictions_(window);
24     if (!window.objc)
25         return print('FAIL - no window.objc');
26
27     // get the data for the pasteboard
28     var myURL = document.URL;
29     var resourceURL = myURL.replace('pasteboard/paste-RTFD.html','resources/RTFD-pasteboard-data.dat');
30     var data = objc('NSData').dataWithContentsOfURL_(objc('NSURL').URLWithString_(resourceURL));
31     
32     // This actually returns DumpRenderTree's local pasteboard
33     var pasteboard = objc('NSPasteboard').generalPasteboard();
34     var pasteboardType = 'NeXT RTFD pasteboard type';
35
36     pasteboard.declareType_owner_(pasteboardType, 0);
37     pasteboard.setData_forType_(data, pasteboardType);
38     
39     pasteCommand();
40     
41     
42 }
43 </script>
44
45 <title>RTFD paste test</title>
46 </head>
47 <body>
48 <p>
49     On Tiger, this test demonstrates a bug in AppKit's -[NSString _documentFromRange:] method where it produces fragments with extra trailing and leading newlines.  This bug is fixed in Leopard.
50 </p>
51 <div contentEditable="true" id="root" class="editing">
52 <div id="test"> </div>
53 </div>
54 <div id='console'/>
55
56 <script>
57 runEditingTest();
58 </script>
59
60 </body>
61 </html>