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

Unified Diff: third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-inline-float.html

Issue 2445193007: Add a couple of regression tests for float fragmentation. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-block-float.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-inline-float.html
diff --git a/third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-inline-float.html b/third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-inline-float.html
new file mode 100644
index 0000000000000000000000000000000000000000..393dffd076080d49151078163e0f0a41a67c2f13
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-inline-float.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<style>body { overflow:scroll; }</style>
+<p>There should be a hotpink square in the bottom left corner of a olive rectangle.</p>
+<div id="multicol" style="position:relative; columns:2; column-fill:auto; orphans:2; widows:2; line-height:20px; height:45px; background:olive;">
+ <br>
+ <div id="elm" style="float:left; width:40px; background:hotpink;"><br><br></div>
+</div>
+<script src="../resources/testharness.js"></script>
+<script src="../resources/testharnessreport.js"></script>
+<script>
+test(() => {
+ var multicol = document.getElementById("multicol");
+ var elm = document.getElementById("elm");
+ assert_equals(elm.offsetTop, 0);
+ assert_equals(elm.offsetHeight, 40);
+ multicol.style.height = "60px";
+ // Now there's room for the float in the first column
+ assert_equals(elm.offsetTop, 20);
+ assert_equals(elm.offsetHeight, 40);
+}, "No crash or assertion failure.");
+</script>
« no previous file with comments | « third_party/WebKit/LayoutTests/fragmentation/change-fragmentainer-height-block-float.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698