This commit is contained in:
Yury Semikhatsky 2024-11-22 12:42:01 -08:00
parent c0c1f0cfe0
commit 64639d91c4

View file

@ -435,11 +435,12 @@ it('should not auto play audio', {
description: 'https://github.com/microsoft/playwright/issues/33590' description: 'https://github.com/microsoft/playwright/issues/33590'
} }
}, async ({ page }) => { }, async ({ page }) => {
await page.route('**/*', async (route) => { await page.route('**/*', async route => {
route.fulfill({ await route.fulfill({
status: 200, status: 200,
contentType: 'text/html', contentType: 'text/html',
body: `<script> body: `
<script>
async function onLoad() { async function onLoad() {
const log = document.getElementById('log'); const log = document.getElementById('log');
const audioContext = new AudioContext(); const audioContext = new AudioContext();