Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

feat(firefox): roll Firefox to 1420 (#24205)

Andrey Lushnikov615f5afb2be6
diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json
index 041adee50c..d4010fa9bf 100644
--- a/packages/playwright-core/browsers.json
+++ b/packages/playwright-core/browsers.json
@@ -21,13 +21,13 @@
},
{
"name": "firefox",
- "revision": "1419",
+ "revision": "1420",
"installByDefault": true,
"browserVersion": "115.0"
},
{
"name": "firefox-beta",
- "revision": "1419",
+ "revision": "1420",
"installByDefault": false,
"browserVersion": "116.0b2"
},
diff --git a/tests/page/page-route.spec.ts b/tests/page/page-route.spec.ts
index b1ce8ba443..8c0a1bc80c 100644
--- a/tests/page/page-route.spec.ts
+++ b/tests/page/page-route.spec.ts
@@ -966,3 +966,20 @@ for (const method of ['fulfill', 'continue', 'fallback', 'abort'] as const) {
expect(e.message).toContain('Route is already handled!');
});
}
+
+it('should intercept when postData is more than 1MB', async ({ page, server }) => {
+ it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22753' });
+ await page.goto(server.EMPTY_PAGE);
+ let interceptionCallback;
+ const interceptionPromise = new Promise(x => interceptionCallback = x);
+ const POST_BODY = '0'.repeat(2 * 1024 * 1024); // 2MB
+ await page.route('**/404.html', async route => {
+ await route.abort();
+ interceptionCallback(route.request().postData());
+ });
+ await page.evaluate(POST_BODY => fetch('/404.html', {
+ method: 'POST',
+ body: POST_BODY,
+ }).catch(e => {}), POST_BODY);
+ expect(await interceptionPromise).toBe(POST_BODY);
+});