Bug 867600 - Change hardcoded sleeps into waits. r=mdas