Test window will quit or show error message when run OpenCL API. Add a workaround for the race condition with the first page during pinning. Change-Id: I9a27b4e173cf94c84aefcb94e255f11169453d94