a3ff23866863c175c68803cd3102672033a9e044
[WebKit-https.git] / LayoutTests / editing / pasteboard / paste-4039777-fix.html
1 <html> 
2 <head>
3
4 <style>
5 .editing { 
6     border: 2px solid red; 
7     font-size: 24px; 
8 }
9 .explanation { 
10     border: 2px solid blue; 
11     padding: 12px; 
12     font-size: 24px; 
13     margin-bottom: 24px;
14 }
15 .scenario { margin-bottom: 16px;}
16 .scenario:first-line { font-weight: bold; margin-bottom: 16px;}
17 .expected-results:first-line { font-weight: bold }
18 </style>
19 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
20
21 <script>
22
23 function editingTest() {
24     for (i = 0; i < 3; i++)
25         extendSelectionForwardByLineCommand();
26     copyCommand();
27     pasteCommand();
28 }
29
30 </script>
31
32 <title>Editing Test</title> 
33 </head> 
34 <body>
35
36 <div class="explanation">
37 <div class="scenario">
38 Tests: 
39 <br>
40 Bug fix for <a href="rdar://problem/4039777">&lt;rdar://problem/4039777&gt;</a> Pasting particular snippet of HTML containing list items and a link creates too many list items
41 </div>
42 <div class="expected-results">
43 Expected Results:
44 <br>
45 Should match:
46 <BR>
47 <ul style="text-align:right;"><li>A</li></ul>
48 <div>
49         <ul>
50                 <li>
51                         <a href="">B</a>
52                         <br>
53                         C 
54                 </li>
55         </ul>
56 </div>
57 </div>
58 </div>
59
60 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
61 <div id="test" class="editing">
62 <ul style="text-align:right;"><li>A</li></ul>
63 <div>
64         <ul>
65                 <li>
66                         <a href="">B</a>
67                         <br>
68                         C 
69                 </li>
70         </ul>
71 </div>
72 </div>
73 </div>
74
75 <script>
76 runEditingTest();
77 </script>
78
79 </body>
80 </html>