Could you put this and getBaseDomain into WebGLTestUtils for better reuse in the future?