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:
parent
e6242d5ef8
commit
50a4a8e9c3
3 changed files with 42 additions and 3 deletions
17
spec/fixtures/module/access-blink-apis.js
vendored
Normal file
17
spec/fixtures/module/access-blink-apis.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
window.delayed = true
|
||||
|
||||
global.getGlobalNames = () => {
|
||||
return Object.getOwnPropertyNames(global)
|
||||
.filter(key => typeof global[key] === 'function')
|
||||
.filter(key => key !== 'WebView')
|
||||
.sort()
|
||||
}
|
||||
|
||||
const atPreload = global.getGlobalNames()
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
window.test = {
|
||||
atPreload,
|
||||
atLoad: global.getGlobalNames()
|
||||
}
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue