Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / pasteboard / copy-paste-float.html
1 <html>
2 <head>
3     <script>
4         function test() {
5             if (window.testRunner)
6                 testRunner.dumpAsText();
7
8             var copySection = document.getElementById("copySection");
9             var pasteSection = document.getElementById("pasteSection");
10             var selection = window.getSelection();
11
12             selection.selectAllChildren(copySection);
13             document.execCommand("Copy");
14
15             selection.collapse(pasteSection, 0);
16             document.execCommand("Paste");
17
18             console.log((pasteSection.firstChild.style.getPropertyValue("float") != "left")
19                 ? "SUCCESS: paste DID NOT keep float:left style."
20                 : "FAILED: paste DID keep float:left style.");
21         }
22     </script>
23     <style>
24         .floatLeft { float:left }
25     </style>
26 </head>
27 <body onload="test()">
28
29     <p>This test is to see if text within a floating block is put onto the paste board wihtout the float style.</p> 
30     <div> 
31     <div id="copySection">
32         <ul class="floatLeft">
33             <li>First LI</li>
34             <li>Second LI</li>
35         </ul>
36     </div>
37
38     <div style="clear:both"><br>---<br></div>
39     <div contenteditable="true" id="pasteSection">---</div>
40
41 </body>
42 </html>