🎨
This commit is contained in:
parent
0c146de7dd
commit
e16fa08e61
2 changed files with 5 additions and 5 deletions
|
@ -598,7 +598,7 @@ describe('browser-window module', function () {
|
||||||
|
|
||||||
const preload = path.join(fixtures, 'module', 'preload-sandbox.js')
|
const preload = path.join(fixtures, 'module', 'preload-sandbox.js')
|
||||||
|
|
||||||
// http protocol to simulate accessing a another domain. this is required
|
// http protocol to simulate accessing another domain. This is required
|
||||||
// because the code paths for cross domain popups is different.
|
// because the code paths for cross domain popups is different.
|
||||||
function crossDomainHandler (request, callback) {
|
function crossDomainHandler (request, callback) {
|
||||||
callback({
|
callback({
|
||||||
|
|
8
spec/fixtures/api/sandbox.html
vendored
8
spec/fixtures/api/sandbox.html
vendored
|
@ -1,9 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
if (window.opener) {
|
if (window.opener) {
|
||||||
window.callback = function() {
|
window.callback = () => {
|
||||||
opener.require('electron').ipcRenderer.send('answer', document.body.innerHTML)
|
opener.require('electron').ipcRenderer.send('answer', document.body.innerHTML)
|
||||||
};
|
}
|
||||||
} else {
|
} else {
|
||||||
const {ipcRenderer} = require('electron')
|
const {ipcRenderer} = require('electron')
|
||||||
const tests = {
|
const tests = {
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
}, false)
|
}, false)
|
||||||
|
|
||||||
let [,test] = window.location.href.split('?')
|
let [,test] = window.location.href.split('?')
|
||||||
if (tests.hasOwnProperty(test))
|
if (tests.hasOwnProperty(test))
|
||||||
tests[test]()
|
tests[test]()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue