diff --git a/lib/WebSocketTransport.js b/lib/WebSocketTransport.js index 492beb62..7bf5a0a9 100644 --- a/lib/WebSocketTransport.js +++ b/lib/WebSocketTransport.js @@ -25,7 +25,10 @@ class WebSocketTransport { */ static create(url) { return new Promise((resolve, reject) => { - const ws = new WebSocket(url, [], { perMessageDeflate: false }); + const ws = new WebSocket(url, [], { + perMessageDeflate: false, + maxPayload: 256 * 1024 * 1024, // 256Mb + }); ws.addEventListener('open', () => resolve(new WebSocketTransport(ws))); ws.addEventListener('error', reject); }); diff --git a/test/evaluation.spec.js b/test/evaluation.spec.js index 23b3b18f..ee3988dc 100644 --- a/test/evaluation.spec.js +++ b/test/evaluation.spec.js @@ -247,6 +247,10 @@ module.exports.addTests = function({testRunner, expect}) { }); expect(result).toEqual([42]); }); + it_fails_ffox('should transfer 100Mb of data from page to node.js', async({page, server}) => { + const a = await page.evaluate(() => Array(100 * 1024 * 1024 + 1).join('a')); + expect(a.length).toBe(100 * 1024 * 1024); + }); }); describe('Page.evaluateOnNewDocument', function() {