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

Unified Diff: third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html

Issue 1459743002: Don't update the logical width when a scrollbar gets added (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
diff --git a/third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html b/third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
index fba0716229e34ea0929c9ffce632691ea6a260b3..b7cf506354bcb6ddcbdde3fe5e43368d5cb23e6c 100644
--- a/third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
+++ b/third_party/WebKit/LayoutTests/css3/flexbox/overflow-auto-resizes-correctly.html
@@ -51,6 +51,11 @@
</div>
</div>
+<!-- This div is only for measuring scrollbar size -->
+<div id="measure" style="height: 100px; width: 100px; display: inline-box; overflow: auto;">
+ <div style="min-height: 300px;"></div>
+</div>
+
<script>
description("When a block inside a flexbox adds scrollbars due to overflow, the parent flexbox should re-flex based on the child size including scrollbars.");
@@ -60,8 +65,10 @@
var intrinsicHeightBox = document.querySelector('.intrinsic-height-box');
shouldBe("intrinsicHeightBox.clientHeight", "intrinsicHeightBox.scrollHeight");
- // This is expected to fail; see:
- // https://codereview.chromium.org/1295933003/#msg1
+ var measure = document.getElementById('measure');
+ var scrollbarSize = measure.offsetWidth - measure.clientWidth;
+ shouldNotBe("scrollbarSize", "0");
+
var vbox = document.querySelector('.vbox');
- shouldBe("vbox.clientWidth", "vbox.scrollWidth");
+ shouldBe("vbox.clientWidth", "100 - scrollbarSize");
</script>

Powered by Google App Engine
This is Rietveld 408576698