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

Unified Diff: LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html

Issue 18601002: Add infrastructure for partial layouts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: define RenderObject::frameView in the header Created 7 years, 3 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/partial-layout-non-overlay-scrollbars.html
diff --git a/LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html b/LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html
new file mode 100644
index 0000000000000000000000000000000000000000..938123a426bde8f902e0aa69b4526dddfe208717
--- /dev/null
+++ b/LayoutTests/fast/dom/partial-layout-non-overlay-scrollbars.html
@@ -0,0 +1,47 @@
+<!DOCTYPE HTML>
+<html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<link rel="stylesheet" href="../../resources/testharness.css">
+<head>
+<style>
+::-webkit-scrollbar {
+ -webkit-appearance: none;
+ width: 8px;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+}
+
+#makespace {
+ height: 5000px;
+}
+</style>
+</head>
+<body>
+<div id="makespace"></div>
+<div id="measure"></div>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ if (window.internals)
+ window.internals.setUsesOverlayScrollbars(true); // Note: We force non-overlay scrollbars with CSS.
+
+ var test = async_test("Test that partial layout works with non-overlay scrollbars.");
+ setTimeout(function() {
+ test.step(function() {
+ var measure = document.getElementById('measure');
+ var measureWidth = measure.offsetWidth; // Partial layout occurs here!
+
+ assert_equals(measureWidth, document.body.offsetWidth);
+ assert_equals(measureWidth, window.innerWidth - 8);
+ });
+
+ test.done();
+ }, 0);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698