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

Unified Diff: LayoutTests/fast/css/sticky/sticky-flexbox.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
Index: LayoutTests/fast/css/sticky/sticky-flexbox.html
diff --git a/LayoutTests/fast/css/sticky/sticky-left.html b/LayoutTests/fast/css/sticky/sticky-flexbox.html
similarity index 50%
copy from LayoutTests/fast/css/sticky/sticky-left.html
copy to LayoutTests/fast/css/sticky/sticky-flexbox.html
index b2537be107d69c398955d76598e9d53943bcc444..f9dc80e4b03dd25862eb83ac2c823ac52ee4c7ca 100644
--- a/LayoutTests/fast/css/sticky/sticky-left.html
+++ b/LayoutTests/fast/css/sticky/sticky-flexbox.html
@@ -8,30 +8,44 @@
width: 2000px;
overflow: hidden; /* hide scrollbars */
}
-
+
+ p {
+ position: relative;
+ left: 100px;
+ }
+
.group {
position: relative;
width: 500px;
height: 200px;
}
-
- .container {
- width: 400px;
+
+ .flex-container {
+ position: relative;
+ display: flex;
+ width: 200px;
height: 180px;
+ flex-flow: row wrap;
outline: 2px solid black;
}
-
+
.box {
- width: 200px;
+ width: 100px;
height: 180px;
}
+ .flex-item {
+ width: 100px;
+ height: 180px;
+ display: flex;
+ }
+
.sticky {
position: sticky;
left: 100px;
background-color: green;
}
-
+
.indicator {
position: absolute;
top: 0;
@@ -48,25 +62,32 @@
</script>
</head>
<body>
- <div class="group">
- <div class="indicator box" style="left: 200px;"></div>
- <div class="container">
- <div class="sticky box"></div>
- </div>
- </div>
+ <p>This test checks the behavior of position:sticky with flex box items.
+ There should be no red.</p>
<div class="group" style="left: 100px">
<div class="indicator box" style="left: 100px;"></div>
- <div class="container">
- <div class="sticky box"></div>
+ <div class="flex-container" style="left: 0px;">
+ <div class="sticky flex-item"></div>
+ <div class="flex-item" style="background-color: green;"></div>
+ </div>
+ </div>
+
+ <div class="group" style="left: 150px">
+ <div class="indicator box" style="left: 50px;"></div>
+ <div class="flex-container" style="left: 0px;">
+ <div class="sticky flex-item"></div>
+ <div class="flex-item" style="background-color: green;"></div>
</div>
</div>
<div class="group" style="left: 200px">
<div class="indicator box" style="left: 0;"></div>
- <div class="container">
- <div class="sticky box"></div>
+ <div class="flex-container" style="left: 0px;">
+ <div class="sticky flex-item"></div>
+ <div class="flex-item" style="background-color: green;"></div>
</div>
</div>
+
</body>
</html>
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-display-expected.html ('k') | LayoutTests/fast/css/sticky/sticky-flexbox-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698