test: reduce flakiness in pdf test (#25407)

This commit is contained in:
Jeremy Rose 2020-09-10 16:47:36 -07:00 committed by GitHub
parent acf5d487d2
commit cd455c8b40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1257,10 +1257,6 @@ describe('chromium features', () => {
w.loadURL(pdfSource);
const [, contents] = await emittedOnce(app, 'web-contents-created');
expect(contents.getURL()).to.equal('chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html');
await new Promise((resolve) => {
contents.on('did-finish-load', resolve);
contents.on('did-frame-finish-load', resolve);
});
});
it('opens when loading a pdf resource in a iframe', async () => {
@ -1268,10 +1264,6 @@ describe('chromium features', () => {
w.loadFile(path.join(__dirname, 'fixtures', 'pages', 'pdf-in-iframe.html'));
const [, contents] = await emittedOnce(app, 'web-contents-created');
expect(contents.getURL()).to.equal('chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html');
await new Promise((resolve) => {
contents.on('did-finish-load', resolve);
contents.on('did-frame-finish-load', resolve);
});
});
});