mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: support Response.buffer(), Response.json() and Response.text() (#4063)
This patch: - implements Response.buffer() and other methods - splits out relevant tests into a separate test suites - implements `testServer.enableGzip()` method to optionally gzip certain routes in tests - adds tests to make sure `Response.text()` returns expected results for binary and compressed responses.
This commit is contained in:
@@ -499,7 +499,7 @@ module.exports.addTests = function({testRunner, expect, Errors, CHROME}) {
|
||||
const error = await navigationPromise;
|
||||
expect(error.message).toBe('Navigating frame was detached');
|
||||
});
|
||||
it_fails_ffox('should return matching responses', async({page, server}) => {
|
||||
it('should return matching responses', async({page, server}) => {
|
||||
// Disable cache: otherwise, chromium will cache similar requests.
|
||||
await page.setCacheEnabled(false);
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
||||
Reference in New Issue
Block a user