Have a CLI version of JetStream 2 to run on watchOS
[WebKit-https.git] / LayoutTests / fast / css-grid-layout / grid-item-scroll-position.html
1 <!DOCTYPE html>
2 <style>
3 #grid {
4   display: grid;
5   height: 300px;
6 }
7 #item {
8   overflow: scroll;
9   overflow-anchor: none;
10 }
11 #content {
12   height: 800px;
13 }
14 </style>
15 <script src="../../resources/testharness.js"></script>
16 <script src="../../resources/testharnessreport.js"></script>
17
18 <div id="log"></div>
19
20 <div id="grid">
21   <div id="item">
22     <div id="content">AAA</div>
23   </div>
24 </div>
25
26 <script>
27 onload = () => {
28   var item = document.querySelector("#item");
29   item.scrollTo(0, 200);
30   document.querySelector("#content").innerHTML = "BBB";
31   test(() => {
32     assert_equals(item.scrollTop, 200);
33   }, "Checks that scroll position is kept when grid item content is modified.");
34 };
35 </script>
36