Delay API for ajax testing