test(chromium): ensure that arguments can be passed with spaces (#10057)

This commit is contained in:
Joel Einbinder 2021-11-23 02:59:56 -05:00 committed by GitHub
parent 0878548238
commit 9c1ff08186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -439,4 +439,14 @@ playwrightTest('should use proxy with connectOverCDP', async ({ browserType, ser
} finally {
await browserServer.close();
}
});
});
playwrightTest('should pass args with spaces', async ({ browserType, createUserDataDir }, testInfo) => {
const browser = await browserType.launchPersistentContext(await createUserDataDir(), {
args: ['--user-agent=I am Foo']
});
const page = await browser.newPage();
const userAgent = await page.evaluate(() => navigator.userAgent);
await browser.close();
expect(userAgent).toBe('I am Foo');
});