summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overflow/scrollable-overflow-vertical-rl-dynamic.html
blob: 07f322901748c9709c3037d0223a546549cc9cff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#scrollbar-layout">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<div id="container" style="width:600px; height:400px; writing-mode:vertical-rl; overflow:auto;">
<div id="target" style="width:1000px; height:500px; background:lime;"></div>
</div>

<script>
promise_test(async () => {
  await new Promise(resolve => requestAnimationFrame(resolve));
  await new Promise(resolve => requestAnimationFrame(resolve));
  // Remove the vertical scrollbar.
  document.querySelector('#target').style.height = '200px';
  assert_equals(document.querySelector('#container').scrollLeft, 0);
}, 'Removing the vertical scrollbar of a vertical-rl container should keep scrollLeft');
</script>