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

Unified Diff: LayoutTests/fast/dom/HTMLTableColElement/resize-table-width-using-col-width.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: Created 6 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/dom/HTMLTableColElement/resize-table-width-using-col-width.html
diff --git a/LayoutTests/fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html b/LayoutTests/fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
new file mode 100644
index 0000000000000000000000000000000000000000..a557c8fb4152cd6488c9f73bf8de04490c5f5054
--- /dev/null
+++ b/LayoutTests/fast/dom/HTMLTableColElement/resize-table-width-using-col-width.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style>
+ col {
+ width: 200px;
+ }
+ td {
+ background-color: #66f;
+ height: 25px;
+ }
+ </style>
+ <script src="../../../resources/js-test.js"></script>
+ <script>
+ function runTest() {
+ description('Tests that the width of table cell changes on changing the colgroup width to new width which is less than its originally defined width. New width should be 100');
+
+ setTimeout(function() {
+ var col = document.getElementById('thecol');
+ col.style.width="100px";
+ shouldBe("document.getElementById('colWidth').offsetWidth","100");
Julien - ping for review 2014/02/06 22:28:18 Do we really need a custom check instead of using
+ finishJSTest();
+ }, 0);
+ }
+ var jsTestIsAsync = true;
+ </script>
+ </head>
+ <body onload="runTest()">
+ <table>
+ <colgroup>
+ <col id="thecol" span="2">
+ </colgroup>
+ <tbody>
+ <tr>
+ <td id="colWidth"></td>
+ </tr>
+ </tbody>
+ </table>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698