moved setTestPattern to before waitVSync