test(chromium): disable webgl2 on headful (#4450)

This commit is contained in:
Joel Einbinder 2020-11-16 16:18:50 -08:00 committed by GitHub
parent 79c592ed7d
commit 93b6faeed2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,16 +72,17 @@ it('should play video', (test, { browserName, platform }) => {
it('should support webgl', (test, {browserName, headful}) => { it('should support webgl', (test, {browserName, headful}) => {
test.fixme(browserName === 'firefox' && !headful); test.fixme(browserName === 'firefox' && !headful);
}, async ({page}) => { }, async ({page}) => {
const hasWebGL2 = await page.evaluate(() => { const hasWebGL = await page.evaluate(() => {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
return !!canvas.getContext('webgl'); return !!canvas.getContext('webgl');
}); });
expect(hasWebGL2).toBe(true); expect(hasWebGL).toBe(true);
}); });
it('should support webgl 2', (test, {browserName, headful}) => { it('should support webgl 2', (test, {browserName, headful}) => {
test.skip(browserName === 'webkit', 'Webkit doesn\'t have webgl2 enabled yet upstream.'); test.skip(browserName === 'webkit', 'Webkit doesn\'t have webgl2 enabled yet upstream.');
test.fixme(browserName === 'firefox' && !headful); test.fixme(browserName === 'firefox' && !headful);
test.fixme(browserName === 'chromium' && headful, 'chromium doesn\'t like webgl2 when running under xvfb');
}, async ({page}) => { }, async ({page}) => {
const hasWebGL2 = await page.evaluate(() => { const hasWebGL2 = await page.evaluate(() => {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');