playwright/packages/playwright-core/src/server/chromium
Yury Semikhatsky 82981a8091
fix: interception id not found error in route.continue (#29180)
We stopped catching all exceptions in
https://github.com/microsoft/playwright/pull/28539 in hope that we'll
get loadingFailed even before Fetch.continue/fulfill command's error.
Turns out this is racy and may fail if the test cancels the request
while we are continuing it. The following test could in theory reproduce
it if stars align and the timing is good:

```js
it('page.continue on canceled request', async ({ page }) => {
  let resolveRoute;
  const routePromise = new Promise<Route>(f => resolveRoute = f);
  await page.route('http://test.com/x', resolveRoute);

  const evalPromise = page.evaluate(async () => {
    const abortController = new AbortController();
    (window as any).abortController = abortController;
    return fetch('http://test.com/x', { signal: abortController.signal }).catch(e => 'cancelled');
  });
  const route = await routePromise;
  void page.evaluate(() => (window as any).abortController.abort());
  await new Promise(f => setTimeout(f, 10));
  await route.continue();
  const req = await evalPromise;
  expect(req).toBe('cancelled');
});
```

Fixes https://github.com/microsoft/playwright/issues/29123
2024-01-25 16:54:42 -08:00
..
appIcon.png chore: migrate to monorepo (#9421) 2021-10-11 16:52:17 +02:00
chromium.ts fix: only convert input files for browser collocated with server (#27873) 2023-11-01 08:40:12 -07:00
chromiumSwitches.ts fix: disable PaintHolding to be able to click in oopifs (#28604) 2023-12-12 12:20:44 -08:00
crAccessibility.ts chore: move protocol and trace types into the top-level packages (#17486) 2022-09-20 18:41:51 -07:00
crBrowser.ts fix: electron video tests (#28004) 2023-11-07 23:42:17 +01:00
crConnection.ts chore: provide better message for unhandled internal server errors (#28653) 2023-12-14 13:49:11 -08:00
crCoverage.ts chore: move protocol and trace types into the top-level packages (#17486) 2022-09-20 18:41:51 -07:00
crDevTools.ts chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
crDragDrop.ts chore: use utils via index export (3) (#13403) 2022-04-07 13:55:44 -07:00
crExecutionContext.ts chore: implement jsHandle._objectCount in chromium (#22127) 2023-03-31 15:52:01 -07:00
crInput.ts chore: use utils via index export (3) (#13403) 2022-04-07 13:55:44 -07:00
crNetworkManager.ts fix: interception id not found error in route.continue (#29180) 2024-01-25 16:54:42 -08:00
crPage.ts fix(chromium): emulate navigator.userAgentData along with UA (#29159) 2024-01-25 07:34:11 -08:00
crPdf.ts chore: save chrome trace on the client side (#24414) 2023-07-26 14:11:26 -07:00
crProtocolHelper.ts chore: save chrome trace on the client side (#24414) 2023-07-26 14:11:26 -07:00
crServiceWorker.ts fix(route): silently catch errors when handling route on server (#28612) 2023-12-13 09:34:20 -08:00
defaultFontFamilies.ts fix(chromium): work around about:blank issue on Chromium (#14068) 2022-05-10 20:32:19 +01:00
protocol.d.ts feat(chromium): roll to r1100 (#29167) 2024-01-25 15:24:49 +01:00
videoRecorder.ts lint: prevent object string concatenation (#23172) 2023-05-19 15:17:43 -07:00