Checks that we handle scripts which move to a different document inside their onerror handlers.