spec: add test for syncronous access to blink APIs (#14637)

This test should ensure we catch a regression of #13787
This commit is contained in:
Samuel Attard 2018-09-25 10:40:15 +12:00 committed by GitHub
parent e6242d5ef8
commit 50a4a8e9c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 3 deletions

View file

@ -1,9 +1,16 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
if (!window.test)
window.test = 'window'
require('electron').ipcRenderer.send('answer', window.test);
const send = () => {
if (!window.test)
window.test = 'window'
require('electron').ipcRenderer.send('answer', window.test);
}
if (window.delayed) {
window.addEventListener('load', send)
} else {
send()
}
</script>
</body>
</html>