Skip to content

Commit 9c1ff08

Browse files
test(chromium): ensure that arguments can be passed with spaces (microsoft#10057)
1 parent 0878548 commit 9c1ff08

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: tests/chromium/chromium.spec.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -439,4 +439,14 @@ playwrightTest('should use proxy with connectOverCDP', async ({ browserType, ser
439439
} finally {
440440
await browserServer.close();
441441
}
442-
});
442+
});
443+
444+
playwrightTest('should pass args with spaces', async ({ browserType, createUserDataDir }, testInfo) => {
445+
const browser = await browserType.launchPersistentContext(await createUserDataDir(), {
446+
args: ['--user-agent=I am Foo']
447+
});
448+
const page = await browser.newPage();
449+
const userAgent = await page.evaluate(() => navigator.userAgent);
450+
await browser.close();
451+
expect(userAgent).toBe('I am Foo');
452+
});

0 commit comments

Comments
 (0)