test: corrupted large string repro (#16369)

Repro for #16367.
This commit is contained in:
Ross Wollman 2022-08-09 10:44:52 -07:00 committed by GitHub
parent 22f0723c72
commit 5dea817355
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,19 @@ it('should work with unicode chars', async ({ page }) => {
expect(result).toBe(42);
});
it('should work with large strings', async ({ page }) => {
const expected = 'x'.repeat(40000);
expect(await page.evaluate(data => data, expected)).toBe(expected);
});
it('should work with large unicode strings', async ({ page, browserName, platform }) => {
it.fail(browserName === 'firefox' && platform !== 'linux');
it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/16367' });
const expected = '🎭'.repeat(10000);
expect(await page.evaluate(data => data, expected)).toBe(expected);
});
it('should throw when evaluation triggers reload', async ({ page }) => {
let error = null;
await page.evaluate(() => {