Automatic update from web-platform-tests Force a stacking context for the scope of a view transition. Bug: 426218225 Change-Id: Ifdad680f295c82181fbac1547c32d5bb3020eaa7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6714984 Reviewed-by: Vladimir Levin <vmpstr@chromium.org> Commit-Queue: Kevin Ellis <kevers@chromium.org> Cr-Commit-Position: refs/heads/main@{#1485169} -- wpt-commits: fdb9003993e6f455dcbe72b5b6c5b70fa805b461 wpt-pr: 53702
22 lines
801 B
JavaScript
22 lines
801 B
JavaScript
function assert_animations(filterFn, mappingFn, expected, message) {
|
|
const values = document.getAnimations()
|
|
.filter(filterFn)
|
|
.map(mappingFn);
|
|
const unique_values = [...new Set(values)].sort();
|
|
|
|
const format = entries => entries.join(", ");
|
|
assert_equals(format(unique_values), format(expected), message);
|
|
}
|
|
|
|
function assert_animation_pseudos(element, expected, message) {
|
|
const filterFn = a => a.effect.target == element;
|
|
const mappingFn = a => a.effect.pseudoElement;
|
|
return assert_animations(filterFn, mappingFn, expected, message);
|
|
}
|
|
|
|
function assert_animation_names(target, expected, message) {
|
|
const filterFn = a => a.effect.pseudoElement == target;
|
|
const mappingFn = a => a.animationName;
|
|
return assert_animations(filterFn, mappingFn, expected, message);
|
|
}
|