test: add libsoup3 related tests (#26572)
https://github.com/microsoft/playwright/issues/22569 https://github.com/microsoft/playwright/issues/23259
This commit is contained in:
parent
2b16860e06
commit
2edecd4244
|
|
@ -23,6 +23,7 @@ export * from './eventsHelper';
|
||||||
export * from './fileUtils';
|
export * from './fileUtils';
|
||||||
export * from './glob';
|
export * from './glob';
|
||||||
export * from './headers';
|
export * from './headers';
|
||||||
|
export * from './hostPlatform';
|
||||||
export * from './httpServer';
|
export * from './httpServer';
|
||||||
export * from './manualPromise';
|
export * from './manualPromise';
|
||||||
export * from './mimeType';
|
export * from './mimeType';
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import url from 'url';
|
import url from 'url';
|
||||||
import { contextTest as it, expect } from '../config/browserTest';
|
import { contextTest as it, expect } from '../config/browserTest';
|
||||||
|
const { hostPlatform } = require('playwright-core/lib/utils');
|
||||||
|
|
||||||
it('SharedArrayBuffer should work @smoke', async function({ contextFactory, httpsServer, browserName }) {
|
it('SharedArrayBuffer should work @smoke', async function({ contextFactory, httpsServer, browserName }) {
|
||||||
it.fail(browserName === 'webkit', 'no shared array buffer on webkit');
|
it.fail(browserName === 'webkit', 'no shared array buffer on webkit');
|
||||||
|
|
@ -270,3 +271,18 @@ it('requestFullscreen', async ({ page, server, browserName, headless, isLinux })
|
||||||
});
|
});
|
||||||
expect(await page.evaluate(() => !!document.fullscreenElement)).toBeFalsy();
|
expect(await page.evaluate(() => !!document.fullscreenElement)).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should send no Content-Length header for GET requests with a Content-Type', async ({ page, server, browserName }) => {
|
||||||
|
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22569' });
|
||||||
|
it.skip(browserName === 'webkit' && hostPlatform === 'ubuntu20.04', 'libsoup2.4 bug');
|
||||||
|
it.fixme(browserName === 'webkit' && hostPlatform === 'ubuntu22.04', 'waiting for libsoup3 upgrade');
|
||||||
|
await page.goto(server.EMPTY_PAGE);
|
||||||
|
const [request] = await Promise.all([
|
||||||
|
server.waitForRequest('/empty.html'),
|
||||||
|
page.evaluate(() => fetch('/empty.html', {
|
||||||
|
'headers': { 'Content-Type': 'application/json' },
|
||||||
|
'method': 'GET'
|
||||||
|
}))
|
||||||
|
]);
|
||||||
|
expect(request.headers['content-length']).toBe(undefined);
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ it('Page.Events.RequestFailed @smoke', async ({ page, server, browserName, platf
|
||||||
expect(failedRequests[0].failure().errorText).toBe('net::ERR_EMPTY_RESPONSE');
|
expect(failedRequests[0].failure().errorText).toBe('net::ERR_EMPTY_RESPONSE');
|
||||||
} else if (browserName === 'webkit') {
|
} else if (browserName === 'webkit') {
|
||||||
if (platform === 'linux')
|
if (platform === 'linux')
|
||||||
expect(failedRequests[0].failure().errorText).toBe('Message Corrupt');
|
expect(failedRequests[0].failure().errorText).toMatch(/(Message Corrupt)|(Connection terminated unexpectedly)/i);
|
||||||
else if (platform === 'darwin')
|
else if (platform === 'darwin')
|
||||||
expect(failedRequests[0].failure().errorText).toBe('The network connection was lost.');
|
expect(failedRequests[0].failure().errorText).toBe('The network connection was lost.');
|
||||||
else if (platform === 'win32')
|
else if (platform === 'win32')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue