Skip to content

Commit

Permalink
test: corrupted large string repro (#16369)
Browse files Browse the repository at this point in the history
Repro for #16367.
  • Loading branch information
rwoll committed Aug 9, 2022
1 parent 22f0723 commit 5dea817
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/page/page-evaluate.spec.ts
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 5dea817

Please sign in to comment.