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

Unified Diff: LayoutTests/fast/css/sticky/sticky-grid-expected.html

Issue 178453002: Add tests for sticky and various display values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplify grid and flexbox tests Created 6 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
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-grid.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/sticky/sticky-grid-expected.html
diff --git a/LayoutTests/fast/css/sticky/sticky-grid-expected.html b/LayoutTests/fast/css/sticky/sticky-grid-expected.html
new file mode 100644
index 0000000000000000000000000000000000000000..b713f1c8d6cf42496fd8b2ab49de66411d8f5fb5
--- /dev/null
+++ b/LayoutTests/fast/css/sticky/sticky-grid-expected.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+
+<html>
+<head>
+<style>
+ body {
+ margin: 0;
+ width: 2000px;
+ overflow: hidden; /* hide scrollbars */
+ }
+
+ p {
+ position: relative;
+ left: 100px;
+ }
+
+ .group {
+ position: relative;
+ width: 500px;
+ height: 200px;
+ }
+
+ .grid-container {
+ display: grid;
+ grid-template-columns: 50% 50%;
+ grid-template-rows: 100%;
+ width: 200px;
+ height: 180px;
+ outline: 2px solid black;
+ }
+
+ .box {
+ width: 100px;
+ height: 180px;
+ }
+
+ .grid-item {
+ width: 100%;
+ height: 100%;
+ }
+
+ .sticky {
+ left: 100px;
+ background-color: green;
+ }
+</style>
+<script>
+ function doTest()
+ {
+ window.scrollTo(100, 0);
+ }
+ window.addEventListener('load', doTest, false);
+</script>
+</head>
+<body>
+ <p>This test checks the behavior of position:sticky with grid items.
+ There should be no red.</p>
+
+ <div class="group" style="left: 100px">
+ <div class="grid-container" style="left: 100px">
+ <div class="sticky grid-item" style="grid-column: 2; grid-row: 1;"></div>
+ <div class="grid-item" style="grid-column: 1; grid-row: 1;"></div>
+ </div>
+ </div>
+
+ <div class="group" style="left: 150px">
+ <div class="grid-container" style="left: 100px; grid-template-columns: 25% 50% 25%">
+ <div class="sticky grid-item" style="grid-column: 2; grid-row: 1;"></div>
+ <div class="grid-item" style="grid-column: 3; grid-row: 1;"></div>
+ </div>
+ </div>
+
+ <div class="group" style="left: 200px">
+ <div class="grid-container" style="left: 100px">
+ <div class="sticky grid-item" style="grid-column: 1; grid-row: 1;"></div>
+ <div class="grid-item" style="grid-column: 2; grid-row: 1;"></div>
+ </div>
+ </div>
+
+</body>
+</html>
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-grid.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698