Bug 1660755 [wpt PR 25207] - [scroll-animations] Allow null source in ScrollTimeline constructor, a=testonly

Automatic update from web-platform-tests
[scroll-animations] Allow null source in ScrollTimeline constructor

The spec was recently updated to differentiate between the source
being missing and the source being null. The former means that the
source should default to document.scrollingElement, and the latter
means that there is no source.

Note: In the CSS API, this translates to 'auto' and 'none',
respectively. Support for this has already landed in a previous CL.

Bug: 1100907
Change-Id: I1436b16d06b7a7ae0de55e2706a7b5d87c0290b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2367837
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801085}

--

wpt-commits: a56629098526c58c4af7744257630cb9483ee902
wpt-pr: 25207
This commit is contained in:
Anders Hartvoll Ruud 2020-08-26 08:57:52 +00:00 коммит произвёл moz-wptsync-bot
Родитель d98dc95d69
Коммит 75b50ca2d7
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -49,13 +49,14 @@ test(t => {
test(t => {
assert_equals(
new ScrollTimeline({scrollSource: null, timeRange: 100}).scrollSource,
document.scrollingElement);
// The default value for scrollSource should also map to the
// document.scrollingElement.
null);
}, 'A ScrollTimeline created with a null scrollSource should have no scrollSource');
test(t => {
assert_equals(
new ScrollTimeline({timeRange: 100}).scrollSource,
document.scrollingElement);
}, 'A ScrollTimeline created with a null scrollSource should use the document.scrollingElement');
}, 'A ScrollTimeline created without a scrollSource should use the document.scrollingElement');
// orientation