Index: third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html |
diff --git a/third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html b/third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6e328dcf44c86aa5f18fb354b434c9241d2d4ccc |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/table/relayout-out-of-flow-with-border-spacing.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<style> |
+ body { margin: 0 } |
+ #ref { margin-left: 100px } |
+ #table { border-spacing: 100px 0 } |
+ #cell { position: relative } |
+ #div { position: absolute } |
+</style> |
+<p>The two Xs below should be horizontally aligned</p> |
+<div id="ref">X</div> |
+<table id="table"> |
+ <td id="cell"> |
+ <div id="div">X</div> |
+ </td> |
+</table> |
+<script> |
+ test(() => { |
+ // Force initial layout of the table. |
+ table.offsetTop; |
+ // Trigger StyleDidChange() on LayoutTable to cause crbug.com/716006 |
+ table.style.backgroundColor = "white"; |
+ table.offsetTop; |
+ // Trigger a re-layout which does not update the column positions. |
+ div.appendChild(document.createTextNode(' ')); |
+ |
+ assert_equals(cell.offsetLeft, 100, "Check that cell is offset by border-spacing."); |
+ }, "Test a re-layout of out-of-flow children of a table cell with border-spacing."); |
+</script> |