test: remove usage of the remote module from tests (#23571)

This commit is contained in:
Milan Burda 2020-05-14 00:33:37 +02:00 committed by GitHub
parent 6282487245
commit 7656480247
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,7 @@
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
window.onbeforeunload = function() { window.onbeforeunload = function() {
setTimeout(function() { setTimeout(function() {
require('electron').remote.getCurrentWindow().emit('onbeforeunload'); require('electron').ipcRenderer.sendSync('onbeforeunload');
}, 0); }, 0);
} }
window.onload = () => window.close(); window.onload = () => window.close();