refactor: cleanup WebFrameMain + improve tests (#27455)

This commit is contained in:
Milan Burda 2021-01-26 22:46:09 +01:00 committed by GitHub
parent ddf3ef0a5f
commit bde714c1c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 30 deletions

View file

@ -126,11 +126,12 @@ describe('webFrameMain module', () => {
const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } });
await w.loadFile(path.join(subframesPath, 'frame.html'));
const webFrame = w.webContents.mainFrame;
expect(webFrame).to.haveOwnProperty('frameTreeNodeId');
expect(webFrame).to.haveOwnProperty('name');
expect(webFrame).to.haveOwnProperty('osProcessId');
expect(webFrame).to.haveOwnProperty('processId');
expect(webFrame).to.haveOwnProperty('routingId');
expect(webFrame).to.have.ownProperty('url').that.is.a('string');
expect(webFrame).to.have.ownProperty('frameTreeNodeId').that.is.a('number');
expect(webFrame).to.have.ownProperty('name').that.is.a('string');
expect(webFrame).to.have.ownProperty('osProcessId').that.is.a('number');
expect(webFrame).to.have.ownProperty('processId').that.is.a('number');
expect(webFrame).to.have.ownProperty('routingId').that.is.a('number');
});
});