Editing tests should use testRunner instead of layoutTestController
[WebKit-https.git] / LayoutTests / editing / pasteboard / paste-table-002.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 function log(message) {
23     var console = document.getElementById("console");
24     var li = document.createElement("li");
25     var text = document.createTextNode(message);
26     li.appendChild(text);
27     console.appendChild(li);
28 }
29
30 function editingTest() {
31     execSelectAllCommand();
32     copyCommand();
33     execDeleteCommand();
34     pasteCommand();
35 }
36
37 </script>
38
39 <title>Editing Test</title> 
40 </head> 
41 <body>
42 Problem: copy/pasting some HTML including tables can give rise to a &lt;div&gt; element as the first child of the table element. This is invalid.
43 <div contenteditable id="root">
44 <div id="test" class="editing">
45 <div>
46 abcdef
47 <div style="text-align: center" >
48 <table><tr><td>foo</td><td>bar</td></tr></table>
49 ghijk
50 </div>
51 </div>
52 </div>
53 </div>
54
55 <ol id="console" />
56
57 <script>
58 runEditingTest();
59 log(root.innerHTML);
60 if (window.testRunner)
61     testRunner.dumpAsText();
62 </script>
63
64 </body>
65 </html>