Upstream sticky-flexbox.html test to WPT

Bug: 699244
Change-Id: Ib41d0dc9754e9e948f1de773fb456f9b9b05d8f0
Reviewed-on: https://chromium-review.googlesource.com/558444
Cr-Commit-Position: refs/heads/master@{#484664}
WPT-Export-Revision: eef95ae0864633d0a57a166e8eac81d5249ab680
diff --git a/css/css-position-3/position-sticky-flexbox-ref.html b/css/css-position-3/position-sticky-flexbox-ref.html
new file mode 100644
index 0000000..554ffa6
--- /dev/null
+++ b/css/css-position-3/position-sticky-flexbox-ref.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<title>Reference for position:sticky elements should work correctly with flexbox</title>
+
+<style>
+.scroller {
+  overflow: scroll;
+  width: 350px;
+  height: 100px;
+  margin-bottom: 15px;
+}
+
+.flex-container {
+  width: 600px;
+  position: relative;
+  display: flex;
+  flex-flow: row wrap;
+}
+
+.green {
+  background-color: green;
+}
+
+.flex-item {
+  height: 85px;
+  width: 100px;
+  display: flex;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+  document.getElementById('scroller1').scrollLeft = 50;
+  document.getElementById('scroller2').scrollLeft = 150;
+  document.getElementById('scroller3').scrollLeft = 250;
+});
+</script>
+
+<div id="scroller1" class="scroller">
+  <div class="flex-container">
+    <div class="flex-item"></div>
+    <div class="green flex-item"></div>
+    <div class="green flex-item"></div>
+  </div>
+</div>
+
+<div id="scroller2" class="scroller">
+  <div class="flex-container">
+    <div class="flex-item"></div>
+    <div class="flex-item"></div>
+    <div class="green flex-item"></div>
+  </div>
+</div>
+
+<div id="scroller3" class="scroller">
+  <div class="flex-container">
+    <div class="flex-item"></div>
+    <div class="flex-item"></div>
+    <div class="green flex-item"></div>
+    <div class="green flex-item"></div>
+  </div>
+</div>
+
+<p>You should see three green boxes of varying size above. There should be no red.</p>
diff --git a/css/css-position-3/position-sticky-flexbox.html b/css/css-position-3/position-sticky-flexbox.html
new file mode 100644
index 0000000..cf4e8cb
--- /dev/null
+++ b/css/css-position-3/position-sticky-flexbox.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<title>position:sticky elements should work correctly with flexbox</title>
+<link rel="match" href="position-sticky-flexbox-ref.html" />
+<link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
+<meta name="assert" content="This test checks that position:sticky elements interoperate correctly with flexbox" />
+
+<style>
+.scroller {
+  overflow: scroll;
+  width: 350px;
+  height: 100px;
+  margin-bottom: 15px;
+}
+
+.flex-container {
+  width: 600px;
+  position: relative;
+  display: flex;
+  flex-flow: row wrap;
+}
+
+.sticky {
+  position: sticky;
+  left: 50px;
+}
+
+.green {
+  background-color: green;
+}
+
+.flex-item {
+  width: 100px;
+  height: 85px;
+  display: flex;
+}
+
+.indicator {
+  position: absolute;
+  background-color: red;
+  width: 100px;
+  height: 85px;
+}
+</style>
+
+<script>
+window.addEventListener('load', function() {
+  document.getElementById('scroller1').scrollLeft = 50;
+  document.getElementById('scroller2').scrollLeft = 150;
+  document.getElementById('scroller3').scrollLeft = 250;
+});
+</script>
+
+<div id="scroller1" class="scroller">
+  <div class="flex-container">
+    <div class="indicator" style="left: 100px;"></div>
+    <div class="flex-item"></div>
+    <div class="sticky green flex-item"></div>
+    <div class="green flex-item"></div>
+  </div>
+</div>
+
+<div id="scroller2" class="scroller">
+  <div class="flex-container">
+    <div class="indicator" style="left: 200px;"></div>
+    <div class="flex-item"></div>
+    <div class="sticky green flex-item"></div>
+    <div class="green flex-item"></div>
+  </div>
+</div>
+
+<div id="scroller3" class="scroller">
+  <div class="flex-container">
+    <div class="indicator" style="left: 300px;"></div>
+    <div class="flex-item"></div>
+    <div class="sticky green flex-item"></div>
+    <div class="green flex-item"></div>
+  </div>
+</div>
+
+<p>You should see three green boxes of varying size above. There should be no red.</p>