fix: don't reject loadURL() promise from did-fail-load - use did-finish-load instead (#40661)

This commit is contained in:
Tamás Zahola 2023-12-12 20:45:14 +01:00 committed by GitHub
parent 80d85c0e8e
commit a94fb2cb5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 6 deletions

View file

@ -514,6 +514,11 @@ describe('webContents module', () => {
.and.have.property('errno', -355); // ERR_INCOMPLETE_CHUNKED_ENCODING
s.close();
});
it('subsequent load failures reject each time', async () => {
await expect(w.loadURL('file:non-existent')).to.eventually.be.rejected();
await expect(w.loadURL('file:non-existent')).to.eventually.be.rejected();
});
});
describe('getFocusedWebContents() API', () => {