Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: LayoutTests/fast/table/table-anonymous-row-bug.html

Issue 8343064: Merge 98411 - Made Table tests for Bug 70678 Platform Independent (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/912/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body style="font-family: ahem; -webkit-font-smoothing: none;"> 3 <body style="font-family: ahem; -webkit-font-smoothing: none;">
4 <style> 4 <style>
5 div.table { display: table; } 5 div.table { display: table; }
6 div.cell { display: table-cell; width: 50px; height: 50px; background-color: blue; } 6 div.cell { display: table-cell; width: 50px; height: 50px; background-color: blue; }
7 div.row { display: table-row; } 7 div.row { display: table-row; }
8 div.test { background-color: green; width: 50px; height: 50px; }
8 </style> 9 </style>
9 10
10 <div class="table" id="table-1"> 11 <div class="table" id="table-1">
11 <div class="row" id="row-1"> 12 <div class="row" id="row-1">
12 <div class="cell">Cell 1</div> 13 <div class="cell"></div>
13 </div> 14 </div>
14 <div class="row" id="row-2"> 15 <div class="row" id="row-2">
15 <div class="cell">Cell 2</div> 16 <div class="cell"></div>
16 </div> 17 </div>
17 </div> 18 </div>
18 19
19 <script> 20 <script>
20 function createSpan() 21 function createDiv()
21 { 22 {
22 var spanElement = document.createElement("span"); 23 var divElement = document.createElement("div");
23 spanElement.appendChild(document.createTextNode("Some text.")); 24 divElement.setAttribute("class", "test");
24 return spanElement; 25 return divElement;
25 } 26 }
26 27
27 function insertSpan(tableID, beforeID) 28 function insertDiv(tableID, beforeID)
28 { 29 {
29 var table = document.getElementById(tableID); 30 var table = document.getElementById(tableID);
30 var before = document.getElementById(beforeID); 31 var before = document.getElementById(beforeID);
31 table.insertBefore(createSpan(), before); 32 table.insertBefore(createDiv(), before);
32 } 33 }
33 34
34 document.body.offsetTop; 35 document.body.offsetTop;
35 36
36 insertSpan("table-1", "row-2"); 37 insertDiv("table-1", "row-2");
37 </script> 38 </script>
38 </body> 39 </body>
39 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698