Skip to content

Commit

Permalink
Bug 1754231 [wpt PR 32751] - Test that scrolling overflow works when …
Browse files Browse the repository at this point in the history
…paint is contained, a=testonly

Automatic update from web-platform-tests
Test that scrolling overflow works when paint is contained (#32751)

Testcase from https://bugs.webkit.org/show_bug.cgi?id=236260.
--

wpt-commits: 42266b06fd3d76851ed7cec2c7471ea6f37b76eb
wpt-pr: 32751
  • Loading branch information
rwlbuis authored and moz-wptsync-bot committed Mar 7, 2022
1 parent 0eb1d5d commit 0c103f0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions testing/web-platform/tests/css/css-contain/contain-paint-049.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<meta charset="utf8">
<title>CSS Containment Test: Scrolling overflow works when paint is contained"</title>
<link rel="help" href="https://drafts.csswg.org/css-contain-1/#containment-paint">
<meta name="assert" content="Scrolling overflow works when paint is contained.">

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<style>
#container {
width: 100px;
height: 100px;
overflow: auto;
contain: paint;
}
.content {
position: absolute;
height: 500%;
width: 100%;
}
</style>

<div id="container">
<div class="content">
</div>
</div>

<script>
test(() => {
container.scrollTo(0, 100);
assert_equals(container.scrollTop, 100);
}, "Scrolling overflow works when paint is contained");
</script>

0 comments on commit 0c103f0

Please sign in to comment.