mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
test: webkit linux fails to load application/octet-stream resource (#8424)
This commit is contained in:
parent
b188468fa4
commit
a6740c852a
@ -35,6 +35,19 @@ it('should work', async ({page, server}) => {
|
||||
expect(await page.evaluate(() => document.body.textContent)).toBe('Yo, page!');
|
||||
});
|
||||
|
||||
it('should work with buffer as body', async ({page, server, browserName, isLinux}) => {
|
||||
it.fail(browserName === 'webkit' && isLinux, 'Loading of application/octet-stream resource fails');
|
||||
await page.route('**/*', route => {
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
body: Buffer.from('Yo, page!')
|
||||
});
|
||||
});
|
||||
const response = await page.goto(server.EMPTY_PAGE);
|
||||
expect(response.status()).toBe(200);
|
||||
expect(await page.evaluate(() => document.body.textContent)).toBe('Yo, page!');
|
||||
});
|
||||
|
||||
it('should work with status code 422', async ({page, server}) => {
|
||||
await page.route('**/*', route => {
|
||||
route.fulfill({
|
||||
|
@ -80,7 +80,6 @@ it('should override with defaults when intercepted response not provided', async
|
||||
|
||||
it('should fulfill with any response', async ({page, server, browserName, browserMajorVersion, isLinux}) => {
|
||||
it.skip(browserName === 'chromium' && browserMajorVersion <= 91, 'Fails in Electron that uses old Chromium');
|
||||
it.fail(browserName === 'webkit' && isLinux, 'Network.responseReceived comes twice');
|
||||
|
||||
server.setRoute('/sample', (req, res) => {
|
||||
res.setHeader('foo', 'bar');
|
||||
@ -95,6 +94,7 @@ it('should fulfill with any response', async ({page, server, browserName, browse
|
||||
await route.fulfill({
|
||||
_response: sampleResponse,
|
||||
status: 201,
|
||||
contentType: 'text/plain'
|
||||
});
|
||||
});
|
||||
const response = await page.goto(server.EMPTY_PAGE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user