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

Unified Diff: LayoutTests/fast/table/resize-table-width-using-col-span.html

Issue 208263013: Col width is not honored when dynamically updated and it would not make table narrower (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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/resize-table-width-using-col-span.html
diff --git a/LayoutTests/fast/table/resize-table-width-using-col-span.html b/LayoutTests/fast/table/resize-table-width-using-col-span.html
new file mode 100644
index 0000000000000000000000000000000000000000..70b5e21f8e09c15bf01f0a7bbba990e7c30f9898
--- /dev/null
+++ b/LayoutTests/fast/table/resize-table-width-using-col-span.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<style>
+ #thecol { width: 200px; }
+ td { height: 25px; }
+</style>
+<script type="text/javascript">
+ onload = function () {
+ var col = document.getElementById('thecol');
+ var output = document.getElementById('test-output');
+ col.offsetTop;
+ col.style.width="100px";
+ checkLayout("#td1", output);
+ checkLayout("#td2", output);
+ checkLayout("#td3", output);
+ checkLayout("#td4", output);
+ checkLayout("#td5", output);
+ checkLayout("#td6", output);
+ checkLayout("#td7", output);
+ checkLayout("#td8", output);
+ checkLayout("#td9", output);
+ }
+</script>
+<script src="../../resources/check-layout.js"></script>
+Tests that the width of table cell changes on changing the colgroup width to new width.
+<table>
+ <colgroup>
+ <col id="thecol" span="4" style="background-color:red">
+ </colgroup>
+ <thead>
+ <tr>
+ <td id="td1" data-expected-width="100"></td>
+ <td id="td2" data-expected-width="100"></td>
+ <td id="td3" data-expected-width="100"></td>
+ </tr>
+ </thead>
+ <tfoot>
+ <tr>
+ <td id="td4" data-expected-width="100"></td>
+ <td id="td5" data-expected-width="100"></td>
+ <td id="td6" data-expected-width="100"></td>
+ </tr>
+ </tfoot>
+ <tbody>
+ <tr>
+ <td id="td7" data-expected-width="100"></td>
+ <td id="td8" data-expected-width="100"></td>
+ <td id="td9" data-expected-width="100"></td>
+ </tr>
+ </tbody>
+</table>
+<div id="test-output"></div>

Powered by Google App Engine
This is Rietveld 408576698