Slightly improved testing of createContext and createImage