Skip to content

Commit 6746e79

Browse files
andruudchromium-wpt-export-bot
authored andcommitted
[@scroll-timeline] Add WPT for unknown descriptors
Fixed: 1246290 Change-Id: I714c9efdcd9db1c2ef339f638dc6e5c9a2d37d09 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3139820 Reviewed-by: Kevin Ellis <[email protected]> Commit-Queue: Anders Hartvoll Ruud <[email protected]> Cr-Commit-Position: refs/heads/main@{#918931}
1 parent 09c926f commit 6746e79

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!DOCTYPE html>
2+
<title>@scroll-timeline: Unknown Descriptors</title>
3+
<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-at-rule">
4+
<link rel="help" src="https://github.com/w3c/csswg-drafts/issues/5109">
5+
<script src="/resources/testharness.js"></script>
6+
<script src="/resources/testharnessreport.js"></script>
7+
<script src="/web-animations/testcommon.js"></script>
8+
<style>
9+
#scroller {
10+
overflow: scroll;
11+
width: 100px;
12+
height: 100px;
13+
}
14+
#contents {
15+
height: 200px;
16+
}
17+
@keyframes expand {
18+
from { width: 100px; }
19+
to { width: 200px; }
20+
}
21+
@scroll-timeline timeline {
22+
unknown: 100px;
23+
source: selector(#scroller);
24+
start: 0px;
25+
end: 100px;
26+
time-range: 10s;
27+
foo: bar;
28+
}
29+
#element {
30+
width: 0px;
31+
animation: expand 10s linear timeline;
32+
}
33+
</style>
34+
<div id=scroller>
35+
<div id=contents></div>
36+
</div>
37+
<div id=element></div>
38+
<script>
39+
promise_test(async (t) => {
40+
scroller.scrollTop = 50;
41+
await waitForNextFrame();
42+
assert_equals(getComputedStyle(element).width, '150px');
43+
}, 'Unknown descriptors do not invalidate the @scroll-timeline rule');
44+
</script>

0 commit comments

Comments
 (0)