Add initial isolated world spec

This commit is contained in:
Kevin Sawicki 2016-12-13 11:47:54 -08:00
parent 5da4f032c3
commit 2928fe5c43
3 changed files with 67 additions and 0 deletions

15
spec/fixtures/api/isolated-preload.js vendored Normal file
View file

@ -0,0 +1,15 @@
const {ipcRenderer} = require('electron')
window.foo = 3
window.addEventListener('message', (event) => {
ipcRenderer.send('isolated-world', {
preloadContext: {
preloadProperty: typeof window.foo,
pageProperty: typeof window.hello,
typeofRequire: typeof require,
typeofProcess: typeof process
},
pageContext: event.data
})
})