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

Unified Diff: LayoutTests/fast/table/table-sections-border-spacing.html

Issue 23548017: border-spacing is doubled between table-row-groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/table/table-sections-border-spacing.html
diff --git a/LayoutTests/fast/table/table-sections-border-spacing.html b/LayoutTests/fast/table/table-sections-border-spacing.html
new file mode 100644
index 0000000000000000000000000000000000000000..4a6c0adcdbff2d85b48d78f0d086b624f5d1ac57
--- /dev/null
+++ b/LayoutTests/fast/table/table-sections-border-spacing.html
@@ -0,0 +1,65 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h3>Test for chromium bug : <a href="https://code.google.com/p/chromium/issues/detail?id=29502">29502</a>. border-spacing is doubled between table-row-groups.</h3>
+<h4>Border-spacing was adding twice, One for bottom of first section and another for top of second section. But bottom of first section and top of second section border spacing should be common.</h4>
+Distance between all rows in the table should be same.
+<br/><br/>
+
+<div id="divId">
+<table border="5" style="border-spacing:10px">
+ <thead>
+ <tr>
+ <th id = "thId"> row0 head0 </th>
+ <th> row0 head1 </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td id = "td1Id"> row0 col0 </td>
+ <td> row0 col11 </td>
+ </tr>
+ <tr>
+ <td id = "td2Id"> row1 col0 </td>
+ <td> row1 col11 </td>
+ </tr>
+ </tbody>
+ <tbody>
+ <tr>
+ <td id = "td3Id"> row0 col0 </td>
+ <td> row0 col11 </td>
+ </tr>
+ <tr>
+ <td id = "td4Id"> row1 col0 </td>
+ <td> row1 col11 </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ <tr>
+ <td id = "td5Id"> row0 foot0 </td>
+ <td> row0 foot1 </td>
+ </tr>
+ </tfoot>
+</table>
+</div>
+<br/>
+<div id="console"></div>
+
+<script>
+ document.getElementById('console').appendChild(document.createElement('br'));
Julien - ping for review 2013/09/05 17:58:03 Looks like you need a function as this line is rep
a.suchit 2013/09/06 05:27:18 Done.
+ shouldBe("(document.getElementById('td1Id').offsetTop - document.getElementById('thId').offsetTop - document.getElementById('thId').offsetHeight)", "10");
Julien - ping for review 2013/09/05 17:58:03 The logic is similar, maybe we could just renamed
a.suchit 2013/09/06 05:27:18 Done.
+ document.getElementById('console').appendChild(document.createElement('br'));
+ shouldBe("(document.getElementById('td2Id').offsetTop - document.getElementById('td1Id').offsetTop - document.getElementById('td1Id').offsetHeight)", "10");
+ document.getElementById('console').appendChild(document.createElement('br'));
+ shouldBe("(document.getElementById('td3Id').offsetTop - document.getElementById('td2Id').offsetTop - document.getElementById('td2Id').offsetHeight)", "10");
+ document.getElementById('console').appendChild(document.createElement('br'));
+ shouldBe("(document.getElementById('td4Id').offsetTop - document.getElementById('td3Id').offsetTop - document.getElementById('td3Id').offsetHeight)", "10");
+ document.getElementById('console').appendChild(document.createElement('br'));
+ shouldBe("(document.getElementById('td5Id').offsetTop - document.getElementById('td4Id').offsetTop - document.getElementById('td4Id').offsetHeight)", "10");
+</script>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698