✅ Add simple spec for getOSProcessId()
This commit is contained in:
parent
9aff17afea
commit
2f297b1893
1 changed files with 16 additions and 0 deletions
|
@ -324,6 +324,22 @@ describe('webContents module', function () {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('getOSProcessId()', function() {
|
||||||
|
it('returns a valid procress id', function() {
|
||||||
|
|
||||||
|
// load URL otherwise getOSProcessId() returns 0
|
||||||
|
w.loadURL('file://' + path.join(__dirname, 'fixtures', 'pages', 'focus-web-contents.html'))
|
||||||
|
|
||||||
|
const specWebContents = w.webContents
|
||||||
|
let pid = null
|
||||||
|
assert.doesNotThrow(function () {
|
||||||
|
pid = specWebContents.getOSProcessId()
|
||||||
|
})
|
||||||
|
assert(typeof pid === 'number', 'is a number')
|
||||||
|
assert(pid > 0 , 'superior to 0')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('zoom api', () => {
|
describe('zoom api', () => {
|
||||||
const zoomScheme = remote.getGlobal('zoomScheme')
|
const zoomScheme = remote.getGlobal('zoomScheme')
|
||||||
const hostZoomMap = {
|
const hostZoomMap = {
|
||||||
|
|
Loading…
Reference in a new issue