test: webm video player (#20421)

Fixes #18423
This commit is contained in:
Yury Semikhatsky 2023-01-27 09:48:47 -08:00 committed by GitHub
parent eb87c9276e
commit faadbba63c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 0 deletions

BIN
tests/assets/movie.webm Normal file

Binary file not shown.

View File

@ -0,0 +1,15 @@
<html>
<body>
<video width="400" controls>
<source src="movie.webm" type="video/webm">
Your browser does not support WebM HTML video.
</video>
<p>
Video courtesy of
<a href="https://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.
</p>
</body>
</html>

View File

@ -84,6 +84,19 @@ it('should play video @smoke', async ({ page, asset, browserName, platform, mode
await page.$eval('video', v => v.pause());
});
it('should play webm video @smoke', async ({ page, asset, browserName, platform, mode }) => {
it.skip(mode === 'docker', 'local paths do not work with remote setup');
it.fixme(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 20, 'Does not work on BigSur');
it.fixme(browserName === 'webkit' && platform === 'win32');
const absolutePath = asset('video_webm.html');
// Our test server doesn't support range requests required to play on Mac,
// so we load the page using a file url.
await page.goto(url.pathToFileURL(absolutePath).href);
await page.$eval('video', v => v.play());
await page.$eval('video', v => v.pause());
});
it('should play audio @smoke', async ({ page, server, browserName, platform }) => {
it.fixme(browserName === 'firefox' && platform === 'win32', 'https://github.com/microsoft/playwright/issues/10887');
it.fixme(browserName === 'firefox' && platform === 'linux', 'https://github.com/microsoft/playwright/issues/10887');