,
  [{block: "start", inline: "start"}, expectedXLeft, expectedYTop],
  [{block: "end", inline: "end"}, expectedXRight, expectedYBottom],
  [{block: "nearest", inline: "nearest"}, "nearest", "nearest"],
].forEach(([input, expectedX, expectedY]) => {
  test(() => {
    window.scrollTo(0, 0);
    testScrollIntoView(input);
    var x = (expectedX === "nearest") ? expectedXRight : expectedX;
    var y = (expectedY === "nearest") ? expectedYBottom : expectedY;
    assert_approx_equals(window.scrollX, x, 0.5, 'sc