"Final value of scrollLeft");
        assert_equals(scrollingWindow.scrollY, elementToRevealTop / 2, "Final value of scrollTop");
      });
    }, "Aborting an ongoing smooth scrolling on the main frame with another smooth scrolling");

    promise_test(() => {
      resetScrollForWindow(scrollingWindow);
      setScrollBehavior(styledElement, "smoothBehavior");
      assert_equals(scrollingWindow.scrollX, 0);
      assert_equals(scrollingWindow.scrollY, 0);
      scrollWindow(scrollingWindow, "scroll", "sm