fix(firefox): unskip worker error test (#2805)

This commit is contained in:
Dmitry Gozman 2020-07-01 22:07:53 -07:00 committed by GitHub
parent e12e2451e4
commit 0d16b16e91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -7,7 +7,7 @@
},
{
"name": "firefox",
"revision": "1117"
"revision": "1118"
},
{
"name": "webkit",

View File

@ -62,10 +62,15 @@ describe('Workers', function() {
const worker = await workerCreatedPromise;
expect(await worker.evaluate('1+1')).toBe(2);
});
it.fail(FFOX)('should report errors', async function({page}) {
// Times out after the 4/15/2020 roll.
it('should report errors', async function({page}) {
const errorPromise = new Promise(x => page.on('pageerror', x));
page.evaluate(() => new Worker(URL.createObjectURL(new Blob([`setTimeout(() => { throw new Error('this is my error'); })`], {type: 'application/javascript'}))));
page.evaluate(() => new Worker(URL.createObjectURL(new Blob([`
setTimeout(() => {
// Do a console.log just to check that we do not confuse it with an error.
console.log('hey');
throw new Error('this is my error');
})
`], {type: 'application/javascript'}))));
const errorLog = await errorPromise;
expect(errorLog.message).toContain('this is my error');
});