tElementById("scroller");

function cleanup() {
  scroller.style.setProperty("scroll-snap-type", "none");
}

test(t => {
  t.add_cleanup(cleanup);
  scroller.scrollTo(0,0);
  assert_equals(scroller.scrollTop, 0);
  assert_equals(scroller.scrollLeft, 0);

  scroller.style.setProperty("scroll-snap-type", "y mandatory");
  assert_equals(scroller.scrollTop, 100);
  assert_equals(scroller.scrollLeft, 0);
}, "Changing the scroller's snap type to y should make it resnap on the y-axis.");

test(t => {
  t.add_clean