Make document and window scroll tests async to avoid race conditions.