mirror of
https://github.com/electron/electron.git
synced 2026-01-27 08:18:28 -05:00
29 lines
839 B
JavaScript
29 lines
839 B
JavaScript
const { expect } = require('chai')
|
|
const { webFrame } = require('electron')
|
|
|
|
describe('webFrame module', function () {
|
|
it('top is self for top frame', () => {
|
|
expect(webFrame.top.context).to.equal(webFrame.context)
|
|
})
|
|
|
|
it('opener is null for top frame', () => {
|
|
expect(webFrame.opener).to.be.null()
|
|
})
|
|
|
|
it('firstChild is null for top frame', () => {
|
|
expect(webFrame.firstChild).to.be.null()
|
|
})
|
|
|
|
it('getFrameForSelector() does not crash when not found', () => {
|
|
expect(webFrame.getFrameForSelector('unexist-selector')).to.be.null()
|
|
})
|
|
|
|
it('findFrameByName() does not crash when not found', () => {
|
|
expect(webFrame.findFrameByName('unexist-name')).to.be.null()
|
|
})
|
|
|
|
it('findFrameByRoutingId() does not crash when not found', () => {
|
|
expect(webFrame.findFrameByRoutingId(-1)).to.be.null()
|
|
})
|
|
})
|