mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(webkit): allow fufilling requests to redirects (#1830)
This commit is contained in:
parent
5ec2c58a75
commit
036f9e50fa
@ -69,7 +69,7 @@ export class WKInterceptableRequest implements network.RouteDelegate {
|
||||
await this._interceptedPromise;
|
||||
|
||||
const base64Encoded = !!response.body && !helper.isString(response.body);
|
||||
const responseBody = response.body ? (base64Encoded ? response.body.toString('base64') : response.body as string) : undefined;
|
||||
const responseBody = response.body ? (base64Encoded ? response.body.toString('base64') : response.body as string) : '';
|
||||
|
||||
const responseHeaders: { [s: string]: string; } = {};
|
||||
if (response.headers) {
|
||||
|
||||
@ -368,8 +368,7 @@ describe('Page.route', function() {
|
||||
expect(response.ok()).toBe(true);
|
||||
expect(intercepted).toBe(true);
|
||||
});
|
||||
// WebKit crashes. Firefox succeeds, but then fails to close.
|
||||
it.fail(FFOX || WEBKIT)('should create a redirect', async({page, server}) => {
|
||||
it('should create a redirect', async({page, server}) => {
|
||||
await page.goto(server.PREFIX + '/empty.html');
|
||||
await page.route('**/*', async(route, request) => {
|
||||
if (request.url() !== server.PREFIX + '/redirect_this')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user