Add failing spec for fetch from isolated world
This commit is contained in:
parent
d009b3267a
commit
7f6283352f
1 changed files with 6 additions and 0 deletions
6
spec/fixtures/api/isolated-preload.js
vendored
6
spec/fixtures/api/isolated-preload.js
vendored
|
@ -1,9 +1,15 @@
|
||||||
|
// Ensure fetch works from isolated world origin
|
||||||
|
fetch('http://localhost:1234')
|
||||||
|
fetch('https://localhost:1234')
|
||||||
|
fetch(`file://${__filename}`)
|
||||||
|
|
||||||
const {ipcRenderer, webFrame} = require('electron')
|
const {ipcRenderer, webFrame} = require('electron')
|
||||||
|
|
||||||
window.foo = 3
|
window.foo = 3
|
||||||
|
|
||||||
webFrame.executeJavaScript('window.preloadExecuteJavaScriptProperty = 1234;')
|
webFrame.executeJavaScript('window.preloadExecuteJavaScriptProperty = 1234;')
|
||||||
|
|
||||||
|
|
||||||
window.addEventListener('message', (event) => {
|
window.addEventListener('message', (event) => {
|
||||||
ipcRenderer.send('isolated-world', {
|
ipcRenderer.send('isolated-world', {
|
||||||
preloadContext: {
|
preloadContext: {
|
||||||
|
|
Loading…
Reference in a new issue