From 21d30c5cbffee989ff7caedd6757645a0e6b3974 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 4 Jan 2024 10:07:46 -0800 Subject: [PATCH 1/6] deps: upgrade puppeteer to 21.7.0 --- core/gather/session.js | 11 ++++++- core/test/gather/session-test.js | 7 +++-- package.json | 4 +-- yarn.lock | 50 ++++++++++++++++---------------- 4 files changed, 42 insertions(+), 30 deletions(-) diff --git a/core/gather/session.js b/core/gather/session.js index ca3376950202..14328097fd7e 100644 --- a/core/gather/session.js +++ b/core/gather/session.js @@ -94,7 +94,16 @@ class ProtocolSession extends CrdpEventEmitter { })); }); - const resultPromise = this._cdpSession.send(method, ...params); + const resultPromise = this._cdpSession.send(method, ...params, { + // Add 50ms to the Puppeteer timeout to ensure the Lighthouse timeout finishes first. + timeout: timeoutMs + 50, + }).catch(err => { + // We set up our own protocol timeout system, so we should ignore protocol timeouts emitted by puppeteer. + // https://github.com/GoogleChrome/lighthouse/issues/15510 + if (/'protocolTimeout'/.test(err)) return; + + throw err; + }); const resultWithTimeoutPromise = Promise.race([resultPromise, timeoutPromise]); return resultWithTimeoutPromise.finally(() => { diff --git a/core/test/gather/session-test.js b/core/test/gather/session-test.js index 510d369673a0..6f61ce5b95b3 100644 --- a/core/test/gather/session-test.js +++ b/core/test/gather/session-test.js @@ -48,10 +48,13 @@ describe('ProtocolSession', () => { let puppeteerSession; /** @type {ProtocolSession} */ let session; + let rawSend = fnAny(); beforeEach(() => { + rawSend = fnAny().mockResolvedValue(Promise.resolve()); + // @ts-expect-error - Individual mock functions are applied as necessary. - puppeteerSession = new CdpCDPSession({_rawSend: fnAny(), send: fnAny()}, '', 'root'); + puppeteerSession = new CdpCDPSession({_rawSend: rawSend}, '', 'root'); session = new ProtocolSession(puppeteerSession); }); @@ -127,7 +130,7 @@ describe('ProtocolSession', () => { const result = await session.sendCommand('Page.navigate', {url: 'foo'}); expect(result).toEqual(123); - expect(send).toHaveBeenCalledWith('Page.navigate', {url: 'foo'}); + expect(send).toHaveBeenCalledWith('Page.navigate', {url: 'foo'}, {timeout: 30050}); }); it('times out a request by default', async () => { diff --git a/package.json b/package.json index ee852d9701e8..89a39a29ef59 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "pako": "^2.0.3", "preact": "^10.7.2", "pretty-json-stringify": "^0.0.2", - "puppeteer": "^21.5.2", + "puppeteer": "^21.7.0", "resolve": "^1.22.1", "rollup": "^2.52.7", "rollup-plugin-polyfill-node": "^0.12.0", @@ -200,7 +200,7 @@ "open": "^8.4.0", "parse-cache-control": "1.0.1", "ps-list": "^8.0.0", - "puppeteer-core": "^21.5.2", + "puppeteer-core": "^21.7.0", "robots-parser": "^3.0.1", "semver": "^5.3.0", "speedline-core": "^1.4.3", diff --git a/yarn.lock b/yarn.lock index 0e629121c567..e9d0ab7d3635 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1133,10 +1133,10 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= -"@puppeteer/browsers@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.8.0.tgz#fb6ee61de15e7f0e67737aea9f9bab1512dbd7d8" - integrity sha512-TkRHIV6k2D8OlUe8RtG+5jgOF/H98Myx0M6AOafC8DdNVOFiBSFa5cpRDtpm8LXOa9sVwe0+e6Q3FC56X/DZfg== +"@puppeteer/browsers@1.9.1": + version "1.9.1" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.9.1.tgz#384ee8b09786f0e8f62b1925e4c492424cb549ee" + integrity sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA== dependencies: debug "4.3.4" extract-zip "2.0.1" @@ -2328,10 +2328,10 @@ chrome-launcher@^1.1.0: is-wsl "^2.2.0" lighthouse-logger "^2.0.1" -chromium-bidi@0.4.33: - version "0.4.33" - resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.4.33.tgz#9a9aba5a5b07118c8e7d6405f8ee79f47418dd1d" - integrity sha512-IxoFM5WGQOIAd95qrSXzJUv4eXIrh+RvU3rwwqIiwYuvfE7U/Llj4fejbsJnjJMUYCuGtVQsY2gv7oGl4aTNSQ== +chromium-bidi@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.5.2.tgz#358b03bb7c53e0f8d0fd77d596ea67ee30f7ff06" + integrity sha512-PbVOSddxgKyj+JByqavWMNqWPCoCaT6XK5Z1EFe168sxnB/BM51LnZEPXSbFcFAJv/+u2B4XNTs9uXxy4GW3cQ== dependencies: mitt "3.0.1" urlpattern-polyfill "9.0.0" @@ -6023,26 +6023,26 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer-core@21.5.2, puppeteer-core@^21.5.2: - version "21.5.2" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-21.5.2.tgz#6d3de4efb2ae65f1ee072043787b75594e88035f" - integrity sha512-v4T0cWnujSKs+iEfmb8ccd7u4/x8oblEyKqplqKnJ582Kw8PewYAWvkH4qUWhitN3O2q9RF7dzkvjyK5HbzjLA== +puppeteer-core@21.7.0, puppeteer-core@^21.7.0: + version "21.7.0" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-21.7.0.tgz#c0abb98cbd17dbd7ee317b4257958337fa25d2c7" + integrity sha512-elPYPozrgiM3phSy7VDUJCVWQ07SPnOm78fpSaaSNFoQx5sur/MqhTSro9Wz8lOEjqCykGC6WRkwxDgmqcy1dQ== dependencies: - "@puppeteer/browsers" "1.8.0" - chromium-bidi "0.4.33" + "@puppeteer/browsers" "1.9.1" + chromium-bidi "0.5.2" cross-fetch "4.0.0" debug "4.3.4" devtools-protocol "0.0.1203626" - ws "8.14.2" + ws "8.16.0" -puppeteer@^21.5.2: - version "21.5.2" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-21.5.2.tgz#0a4a72175c0fd0944d6486f4734807e1671d527b" - integrity sha512-BaAGJOq8Fl6/cck6obmwaNLksuY0Bg/lIahCLhJPGXBFUD2mCffypa4A592MaWnDcye7eaHmSK9yot0pxctY8A== +puppeteer@^21.7.0: + version "21.7.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-21.7.0.tgz#c4b46ef28a2986f9c536eb086ab47c8dea80e4f9" + integrity sha512-Yy+UUy0b9siJezbhHO/heYUoZQUwyqDK1yOQgblTt0l97tspvDVFkcW9toBlnSvSfkDmMI3Dx9cZL6R8bDArHA== dependencies: - "@puppeteer/browsers" "1.8.0" + "@puppeteer/browsers" "1.9.1" cosmiconfig "8.3.6" - puppeteer-core "21.5.2" + puppeteer-core "21.7.0" q@^1.5.1: version "1.5.1" @@ -7427,10 +7427,10 @@ write-file-atomic@^4.0.1: imurmurhash "^0.1.4" signal-exit "^3.0.7" -ws@8.14.2: - version "8.14.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.14.2.tgz#6c249a806eb2db7a20d26d51e7709eab7b2e6c7f" - integrity sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g== +ws@8.16.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" + integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ== ws@>=7.4.6: version "8.13.0" From 8a9f52e8d6855a46ca4c4c2deb3e7e0823d30136 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 4 Jan 2024 11:37:23 -0800 Subject: [PATCH 2/6] tests --- core/gather/driver/navigation.js | 3 ++- core/gather/session.js | 1 + core/test/gather/session-test.js | 31 +++++++++++++++---------------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/core/gather/driver/navigation.js b/core/gather/driver/navigation.js index 4ea0cd99d236..5b69b6bd118d 100644 --- a/core/gather/driver/navigation.js +++ b/core/gather/driver/navigation.js @@ -97,7 +97,8 @@ async function gotoURL(driver, requestor, options) { let waitForNavigationTriggered; if (typeof requestor === 'string') { // No timeout needed for Page.navigate. See https://github.com/GoogleChrome/lighthouse/pull/6413 - session.setNextProtocolTimeout(Infinity); + // `Infinity` doesn't work with Puppeteer's timeout system so just use a very long 5 min timeout + session.setNextProtocolTimeout(300_000); waitForNavigationTriggered = session.sendCommand('Page.navigate', {url: requestor}); } else { waitForNavigationTriggered = requestor(); diff --git a/core/gather/session.js b/core/gather/session.js index 14328097fd7e..448552a7c79f 100644 --- a/core/gather/session.js +++ b/core/gather/session.js @@ -70,6 +70,7 @@ class ProtocolSession extends CrdpEventEmitter { * @param {number} ms */ setNextProtocolTimeout(ms) { + if (!Number.isFinite(ms)) throw new Error('Timeout must be finite'); this._nextProtocolTimeout = ms; } diff --git a/core/test/gather/session-test.js b/core/test/gather/session-test.js index 6f61ce5b95b3..ffe54ebf641d 100644 --- a/core/test/gather/session-test.js +++ b/core/test/gather/session-test.js @@ -171,23 +171,16 @@ describe('ProtocolSession', () => { }); }); - it('respects a timeout of infinity', async () => { - const sendPromise = createDecomposedPromise(); - puppeteerSession.send = fnAny().mockReturnValue(sendPromise.promise); - - session.setNextProtocolTimeout(Infinity); - const resultPromise = makePromiseInspectable(session.sendCommand('Page.navigate', {url: ''})); - - await timers.advanceTimersByTime(100_000); - await flushAllTimersAndMicrotasks(); - - expect(resultPromise).not.toBeDone(); - - sendPromise.resolve('result'); - await flushAllTimersAndMicrotasks(); + it('rejects on error from protocol', async () => { + rawSend.mockRejectedValue(new Error('Url is not valid')); + const resultPromise = session.sendCommand('Page.navigate', {url: ''}); + await expect(resultPromise).rejects.toThrow('Url is not valid'); + }); - expect(resultPromise).toBeDone(); - expect(await resultPromise).toBe('result'); + it('ignores protocol timeouts from puppeteer', async () => { + rawSend.mockRejectedValue(new Error(`Increase 'protocolTimeout'`)); + const resultPromise = session.sendCommand('Page.navigate', {url: ''}); + await expect(resultPromise).resolves.toBeUndefined(); }); }); @@ -219,5 +212,11 @@ describe('ProtocolSession', () => { expect(session.hasNextProtocolTimeout()).toBe(false); expect(session.getNextProtocolTimeout()).toBe(DEFAULT_TIMEOUT); }); + + it('should handle infinite timeout', () => { + expect(() => session.setNextProtocolTimeout(Infinity)).toThrow(/must be finite/); + expect(session.hasNextProtocolTimeout()).toBe(false); + expect(session.getNextProtocolTimeout()).toBe(DEFAULT_TIMEOUT); + }); }); }); From f1259b50cfa2c1bc8f2872bf07b824ae854f17c0 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 4 Jan 2024 12:10:54 -0800 Subject: [PATCH 3/6] 51 --- core/gather/driver/wait-for-condition.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/gather/driver/wait-for-condition.js b/core/gather/driver/wait-for-condition.js index 202ee71182ba..d123c27ec2c8 100644 --- a/core/gather/driver/wait-for-condition.js +++ b/core/gather/driver/wait-for-condition.js @@ -540,7 +540,8 @@ function waitForUserToContinue(driver) { } /* c8 ignore stop */ - driver.defaultSession.setNextProtocolTimeout(2 ** 31 - 1); + // Do "- 51" instead of "- 1" because we always add 50ms for the Puppeteer timeout + driver.defaultSession.setNextProtocolTimeout(2 ** 31 - 51); return driver.executionContext.evaluate(createInPagePromise, {args: []}); } From d87ed92e8a06f0bda1c3e171eed4ff13489011b8 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 4 Jan 2024 16:26:37 -0800 Subject: [PATCH 4/6] more practical --- core/gather/driver/navigation.js | 3 +-- core/gather/driver/wait-for-condition.js | 3 +-- core/gather/session.js | 15 +++++++++++---- core/test/gather/session-test.js | 6 +++--- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/core/gather/driver/navigation.js b/core/gather/driver/navigation.js index 5b69b6bd118d..4ea0cd99d236 100644 --- a/core/gather/driver/navigation.js +++ b/core/gather/driver/navigation.js @@ -97,8 +97,7 @@ async function gotoURL(driver, requestor, options) { let waitForNavigationTriggered; if (typeof requestor === 'string') { // No timeout needed for Page.navigate. See https://github.com/GoogleChrome/lighthouse/pull/6413 - // `Infinity` doesn't work with Puppeteer's timeout system so just use a very long 5 min timeout - session.setNextProtocolTimeout(300_000); + session.setNextProtocolTimeout(Infinity); waitForNavigationTriggered = session.sendCommand('Page.navigate', {url: requestor}); } else { waitForNavigationTriggered = requestor(); diff --git a/core/gather/driver/wait-for-condition.js b/core/gather/driver/wait-for-condition.js index d123c27ec2c8..4766ceb08212 100644 --- a/core/gather/driver/wait-for-condition.js +++ b/core/gather/driver/wait-for-condition.js @@ -540,8 +540,7 @@ function waitForUserToContinue(driver) { } /* c8 ignore stop */ - // Do "- 51" instead of "- 1" because we always add 50ms for the Puppeteer timeout - driver.defaultSession.setNextProtocolTimeout(2 ** 31 - 51); + driver.defaultSession.setNextProtocolTimeout(Infinity); return driver.executionContext.evaluate(createInPagePromise, {args: []}); } diff --git a/core/gather/session.js b/core/gather/session.js index 448552a7c79f..4fa66e6651d6 100644 --- a/core/gather/session.js +++ b/core/gather/session.js @@ -10,6 +10,14 @@ import {LighthouseError} from '../lib/lh-error.js'; // Controls how long to wait for a response after sending a DevTools protocol command. const DEFAULT_PROTOCOL_TIMEOUT = 30000; +const PPTR_BUFFER = 50; + +/** + * Defined as the max int32 minus the buffer we use for Puppeteer timeouts. + * + * This is ~50 days which is as good as infinity for all practical purposes. + */ +const MAX_TIMEOUT = (2 ** 32 - 1) - PPTR_BUFFER; /** @typedef {LH.Protocol.StrictEventEmitterClass} CrdpEventMessageEmitter */ const CrdpEventEmitter = /** @type {CrdpEventMessageEmitter} */ (EventEmitter); @@ -70,7 +78,8 @@ class ProtocolSession extends CrdpEventEmitter { * @param {number} ms */ setNextProtocolTimeout(ms) { - if (!Number.isFinite(ms)) throw new Error('Timeout must be finite'); + // Infinity does not work with Puppeteer's timeout system so just use the max timeout instead. + if (!Number.isFinite(ms)) ms = MAX_TIMEOUT; this._nextProtocolTimeout = ms; } @@ -87,8 +96,6 @@ class ProtocolSession extends CrdpEventEmitter { /** @type {NodeJS.Timer|undefined} */ let timeout; const timeoutPromise = new Promise((resolve, reject) => { - if (timeoutMs === Infinity) return; - // eslint-disable-next-line max-len timeout = setTimeout(reject, timeoutMs, new LighthouseError(LighthouseError.errors.PROTOCOL_TIMEOUT, { protocolMethod: method, @@ -97,7 +104,7 @@ class ProtocolSession extends CrdpEventEmitter { const resultPromise = this._cdpSession.send(method, ...params, { // Add 50ms to the Puppeteer timeout to ensure the Lighthouse timeout finishes first. - timeout: timeoutMs + 50, + timeout: timeoutMs + PPTR_BUFFER, }).catch(err => { // We set up our own protocol timeout system, so we should ignore protocol timeouts emitted by puppeteer. // https://github.com/GoogleChrome/lighthouse/issues/15510 diff --git a/core/test/gather/session-test.js b/core/test/gather/session-test.js index ffe54ebf641d..fa71a64ce0c1 100644 --- a/core/test/gather/session-test.js +++ b/core/test/gather/session-test.js @@ -214,9 +214,9 @@ describe('ProtocolSession', () => { }); it('should handle infinite timeout', () => { - expect(() => session.setNextProtocolTimeout(Infinity)).toThrow(/must be finite/); - expect(session.hasNextProtocolTimeout()).toBe(false); - expect(session.getNextProtocolTimeout()).toBe(DEFAULT_TIMEOUT); + session.setNextProtocolTimeout(Infinity); + expect(session.hasNextProtocolTimeout()).toBe(true); + expect(session.getNextProtocolTimeout()).toBe(4294967245); }); }); }); From 7f25faa8bf77a0a163a03c9ae42a7b521f664f05 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Thu, 4 Jan 2024 16:53:39 -0800 Subject: [PATCH 5/6] comments + logic fix --- core/gather/session.js | 12 +++++++----- core/test/gather/session-test.js | 27 ++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/core/gather/session.js b/core/gather/session.js index 4fa66e6651d6..7e94cd451523 100644 --- a/core/gather/session.js +++ b/core/gather/session.js @@ -13,11 +13,14 @@ const DEFAULT_PROTOCOL_TIMEOUT = 30000; const PPTR_BUFFER = 50; /** - * Defined as the max int32 minus the buffer we use for Puppeteer timeouts. + * Puppeteer timeouts must fit into an int32 and the maximum timeout for `setTimeout` is a *signed* + * int32. However, this also needs to account for the puppeteer buffer we add to the timeout later. * - * This is ~50 days which is as good as infinity for all practical purposes. + * So this is defined as the max *signed* int32 minus PPTR_BUFFER. + * + * In human terms, this timeout is ~25 days which is as good as infinity for all practical purposes. */ -const MAX_TIMEOUT = (2 ** 32 - 1) - PPTR_BUFFER; +const MAX_TIMEOUT = 2147483647 - PPTR_BUFFER; /** @typedef {LH.Protocol.StrictEventEmitterClass} CrdpEventMessageEmitter */ const CrdpEventEmitter = /** @type {CrdpEventMessageEmitter} */ (EventEmitter); @@ -78,8 +81,7 @@ class ProtocolSession extends CrdpEventEmitter { * @param {number} ms */ setNextProtocolTimeout(ms) { - // Infinity does not work with Puppeteer's timeout system so just use the max timeout instead. - if (!Number.isFinite(ms)) ms = MAX_TIMEOUT; + if (ms > MAX_TIMEOUT) ms = MAX_TIMEOUT; this._nextProtocolTimeout = ms; } diff --git a/core/test/gather/session-test.js b/core/test/gather/session-test.js index fa71a64ce0c1..59ef2b706664 100644 --- a/core/test/gather/session-test.js +++ b/core/test/gather/session-test.js @@ -171,6 +171,25 @@ describe('ProtocolSession', () => { }); }); + it('respects a timeout of infinity', async () => { + const sendPromise = createDecomposedPromise(); + puppeteerSession.send = fnAny().mockReturnValue(sendPromise.promise); + + session.setNextProtocolTimeout(Infinity); + const resultPromise = makePromiseInspectable(session.sendCommand('Page.navigate', {url: ''})); + + await timers.advanceTimersByTime(100_000); + await flushAllTimersAndMicrotasks(); + + expect(resultPromise).not.toBeDone(); + + sendPromise.resolve('result'); + await flushAllTimersAndMicrotasks(); + + expect(resultPromise).toBeDone(); + expect(await resultPromise).toBe('result'); + }); + it('rejects on error from protocol', async () => { rawSend.mockRejectedValue(new Error('Url is not valid')); const resultPromise = session.sendCommand('Page.navigate', {url: ''}); @@ -216,7 +235,13 @@ describe('ProtocolSession', () => { it('should handle infinite timeout', () => { session.setNextProtocolTimeout(Infinity); expect(session.hasNextProtocolTimeout()).toBe(true); - expect(session.getNextProtocolTimeout()).toBe(4294967245); + expect(session.getNextProtocolTimeout()).toBe(2147483597); + }); + + it('should handle extremely large (but not infinite) timeout', () => { + session.setNextProtocolTimeout(2 ** 40); + expect(session.hasNextProtocolTimeout()).toBe(true); + expect(session.getNextProtocolTimeout()).toBe(2147483597); }); }); }); From 9076d8562b3134c476f991adb121af735d543d10 Mon Sep 17 00:00:00 2001 From: Adam Raine Date: Fri, 5 Jan 2024 09:21:05 -0800 Subject: [PATCH 6/6] meh --- core/gather/session.js | 6 ------ core/test/gather/session-test.js | 6 ------ 2 files changed, 12 deletions(-) diff --git a/core/gather/session.js b/core/gather/session.js index 7e94cd451523..d821ada4b31b 100644 --- a/core/gather/session.js +++ b/core/gather/session.js @@ -107,12 +107,6 @@ class ProtocolSession extends CrdpEventEmitter { const resultPromise = this._cdpSession.send(method, ...params, { // Add 50ms to the Puppeteer timeout to ensure the Lighthouse timeout finishes first. timeout: timeoutMs + PPTR_BUFFER, - }).catch(err => { - // We set up our own protocol timeout system, so we should ignore protocol timeouts emitted by puppeteer. - // https://github.com/GoogleChrome/lighthouse/issues/15510 - if (/'protocolTimeout'/.test(err)) return; - - throw err; }); const resultWithTimeoutPromise = Promise.race([resultPromise, timeoutPromise]); diff --git a/core/test/gather/session-test.js b/core/test/gather/session-test.js index 59ef2b706664..a0c63c68686b 100644 --- a/core/test/gather/session-test.js +++ b/core/test/gather/session-test.js @@ -195,12 +195,6 @@ describe('ProtocolSession', () => { const resultPromise = session.sendCommand('Page.navigate', {url: ''}); await expect(resultPromise).rejects.toThrow('Url is not valid'); }); - - it('ignores protocol timeouts from puppeteer', async () => { - rawSend.mockRejectedValue(new Error(`Increase 'protocolTimeout'`)); - const resultPromise = session.sendCommand('Page.navigate', {url: ''}); - await expect(resultPromise).resolves.toBeUndefined(); - }); }); describe('.has/get/setNextProtocolTimeout', () => {