feat(firefox): bump to 1257 and 1247 (stable) (#6476)

This fixes addBinding on pages with CSP.
This commit is contained in:
Dmitry Gozman 2021-05-10 08:41:18 -07:00 committed by GitHub
parent 5f7739962c
commit 845054d28b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -8,12 +8,12 @@
},
{
"name": "firefox",
"revision": "1256",
"revision": "1257",
"installByDefault": true
},
{
"name": "firefox-stable",
"revision": "1246",
"revision": "1247",
"installByDefault": false
},
{

View file

@ -85,3 +85,12 @@ it('exposeBindingHandle should work', async ({context}) => {
expect(await target.evaluate(x => x.foo)).toBe(42);
expect(result).toEqual(17);
});
it('should work with CSP', async ({ page, context, server }) => {
server.setCSP('/empty.html', 'default-src "self"');
await page.goto(server.EMPTY_PAGE);
let called = false;
await context.exposeBinding('hi', () => called = true);
await page.evaluate(() => (window as any).hi());
expect(called).toBe(true);
});