<!doctype html><head><metacharset=utf-8><title>Test getAnimations() which doesn't return scroll animations</title><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><scriptsrc="../testcommon.js"></script><style>@keyframesanimWidth{from{width:100px;}to{width:200px}}@keyframesanimTop{to{top:100px}}.fill-vh{width:100px;height:100vh;}</style></head><body><divid="log"></div><script>"use strict";test(function(t){constdiv=addDiv(t,{style:"width: 10px; height: 100px; "+"animation: animWidth 100s, animTop 200s; "+"animation-timeline: scroll(), auto;"});// Sanity check to make sure the scroll animation is there.addDiv(t,{class:"fill-vh"});constscroller=document.scrollingElement;constmaxScroll=scroller.scrollHeight-scroller.clientHeight;scroller.scrollTop=maxScroll;assert_equals(getComputedStyle(div).width,"200px","The scroll animation is there");constanimations=div.getAnimations();assert_equals(animations.length,2,'getAnimations() should include scroll animations');assert_equals(animations[0].animationName,"animWidth",'getAmimations() should return scroll animations');// FIXME: Bug 1676794. Support ScrollTimeline interface.assert_equals(animations[0].timeline,null,'scroll animation should not return scroll timeline');},'Element.getAnimation() should include scroll animations');test(function(t){constdiv=addDiv(t,{style:"width: 10px; height: 100px; "+"animation: animWidth 100s, animTop 100s; "+"animation-timeline: scroll(), auto;"});// Sanity check to make sure the scroll animation is there.addDiv(t,{class:"fill-vh"});constscroller=document.scrollingElement;constmaxScroll=scroller.scrollHeight-scroller.clientHeight;scroller.scrollTop=maxScroll;assert_equals(getComputedStyle(div).width,"200px","The scroll animation is there");constanimations=document.getAnimations();assert_equals(animations.length,2,'getAnimations() should include scroll animations');assert_equals(animations[0].animationName,"animWidth",'getAmimations() should return scroll animations');// FIXME: Bug 1676794. Support ScrollTimeline interface.assert_equals(animations[0].timeline,null,'scroll animation should not return scroll timeline');},'Document.getAnimation() should include scroll animations');</script></body>