Make document and window scroll tests async to avoid race conditions.
Merge branch 'dev-master' into dev-3.x