spec: No node integration in iframe
This commit is contained in:
Родитель
ef15b670a9
Коммит
7210f6e64d
|
@ -65,3 +65,19 @@ describe 'chromium feature', ->
|
|||
assert.equal event.data, message
|
||||
done()
|
||||
worker.port.postMessage message
|
||||
|
||||
describe 'iframe', ->
|
||||
iframe = null
|
||||
|
||||
beforeEach ->
|
||||
iframe = document.createElement 'iframe'
|
||||
|
||||
afterEach ->
|
||||
document.body.removeChild iframe
|
||||
|
||||
it 'does not have node integration', (done) ->
|
||||
iframe.src = "file://#{fixtures}/pages/set-global.html"
|
||||
document.body.appendChild iframe
|
||||
iframe.onload = ->
|
||||
assert.equal iframe.contentWindow.test, 'undefined undefined undefined'
|
||||
done()
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<body>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
window.test = [typeof require, typeof module, typeof process].join(' ')
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче