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

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

Issue 151993004: 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: Added new test cases as per suggestion. Created 6 years, 9 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-multiple-col-span.html
diff --git a/LayoutTests/fast/table/resize-table-width-using-multiple-col-span.html b/LayoutTests/fast/table/resize-table-width-using-multiple-col-span.html
new file mode 100644
index 0000000000000000000000000000000000000000..19e95bb4339abc080131031308aa1823ffd2377c
--- /dev/null
+++ b/LayoutTests/fast/table/resize-table-width-using-multiple-col-span.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ #thecol {
+ width: 200px;
+ }
+ #thecol2 {
+ width: 300px;
+ }
+ td {
+ height: 25px;
+ }
+ </style>
+ <script type="text/javascript">
+ function runTest() {
+ var col = document.getElementById('thecol');
+ var col2 = document.getElementById('thecol2');
+ col.offsetTop;
+ col.style.width="100px";
+ col2.style.width="200px";
+ window.checkLayout("#td1", document.getElementById("test-output"));
+ window.checkLayout("#td2", document.getElementById("test-output"));
+ window.checkLayout("#td3", document.getElementById("test-output"));
+ window.checkLayout("#td4", document.getElementById("test-output"));
+ window.checkLayout("#td5", document.getElementById("test-output"));
+ window.checkLayout("#td6", document.getElementById("test-output"));
+ window.checkLayout("#td7", document.getElementById("test-output"));
+ window.checkLayout("#td8", document.getElementById("test-output"));
+ window.checkLayout("#td9", document.getElementById("test-output"));
+ }
+ </script>
+ <script src="../../resources/check-layout.js"></script>
+ </head>
+ <body onload="runTest()">
+ Tests that the width of table cell changes on changing the colgroup width to new width.
+ <table>
+ <colgroup>
+ <col id="thecol" span="2" style="background-color:red">
+ <col id="thecol2" span="1" style="background-color:blue">
+ </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="200"></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="200"></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="200"></td>
+ </tr>
+ </tbody>
+ </table>
+ <div id="test-output"></div>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698