feat(webkit): intercepted response body (#7229)

This commit is contained in:
Yury Semikhatsky 2021-07-05 00:27:14 -07:00 committed by GitHub
parent 4c219add0c
commit 02ff213d4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -72,8 +72,8 @@ export class WKInterceptableRequest implements network.RouteDelegate {
// Empty buffer will result in the response being used.
if (forFulfill)
return Buffer.from('');
const response = await this._session.send('Network.getResponseBody', { requestId: this._requestId });
return Buffer.from(response.body, response.base64Encoded ? 'base64' : 'utf8');
const response = await this._session.send('Network.getInterceptedResponseBody', { requestId: this._requestId });
return Buffer.from(response.body, 'base64');
}
async abort(errorCode: string) {

View file

@ -122,7 +122,6 @@ it('should give access to the intercepted response', async ({page, server, brows
it('should give access to the intercepted response body', async ({page, server, browserName}) => {
it.fixme(browserName === 'firefox');
it.fixme(browserName === 'webkit');
await page.goto(server.EMPTY_PAGE);