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

Unified Diff: LayoutTests/fast/table/caption-in-inline.html

Issue 895953003: Insert an anonymous inline-table when inserting a table part under an inline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review - lump similar tests together in one file. Created 5 years, 10 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/caption-in-inline.html
diff --git a/LayoutTests/fast/table/caption-in-inline.html b/LayoutTests/fast/table/caption-in-inline.html
new file mode 100644
index 0000000000000000000000000000000000000000..57d9c6aa0b1f73b855e9738dfb1d36e7cfe3212c
--- /dev/null
+++ b/LayoutTests/fast/table/caption-in-inline.html
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
+<p>Test that a table-caption with a table-cell sibling is wrapped inside an inline-table when the parent is inline.</p>
+<span>
+ <div id="first" style="display:table-caption; width:100%; height:40px; background:blue;">&nbsp;</div>
+ <div id="second" style="display:table-cell; width:80px; height:40px; background:blue;">&nbsp;</div>
+ <span id="last">There should be a blue square to the left of this line.</span>
+</span>
+<div id="console"></div>
+<script>
+ var firstRects = document.getElementById('first').getClientRects();
+ var secondRects = document.getElementById('second').getClientRects();
+ var lastRects = document.getElementById('last').getClientRects();
+ shouldBe("firstRects.length", "1");
+ shouldBe("secondRects.length", "1");
+ shouldBe("lastRects.length", "1");
+ shouldBe("secondRects[0].top", "firstRects[0].top + 40");
+ shouldBe("secondRects[0].left", "firstRects[0].left");
+ shouldBe("secondRects[0].bottom", "secondRects[0].top + 40");
+ shouldBeGreaterThanOrEqual("lastRects[0].right", "secondRects[0].left");
+ shouldBeGreaterThanOrEqual("lastRects[0].top", "firstRects[0].top");
+ shouldBeGreaterThanOrEqual("secondRects[0].bottom", "lastRects[0].bottom");
+</script>

Powered by Google App Engine
This is Rietveld 408576698