Checks that async scripts fire onbeforeload immediately and that it is cancellable.