test: skip protocol.registerSchemesAsPrivileged stream test when media not supported (#27216)

This commit is contained in:
Milan Burda 2021-01-07 20:45:29 +01:00 committed by GitHub
parent 2268c64a55
commit 85a9abf377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -908,8 +908,12 @@ describe('protocol module', () => {
await fs.promises.unlink(videoPath);
});
beforeEach(async () => {
beforeEach(async function () {
w = new BrowserWindow({ show: false });
await w.loadURL('about:blank');
if (!await w.webContents.executeJavaScript('document.createElement(\'video\').canPlayType(\'video/webm; codecs="vp8.0"\')')) {
this.skip();
}
});
afterEach(async () => {