Add clearer assertion of process being undefined
This commit is contained in:
parent
d7b1792503
commit
9e66df23d0
2 changed files with 3 additions and 3 deletions
|
@ -160,7 +160,7 @@ describe('chromium feature', function () {
|
||||||
it('accepts "nodeIntegration" as feature', function (done) {
|
it('accepts "nodeIntegration" as feature', function (done) {
|
||||||
var b
|
var b
|
||||||
listener = function (event) {
|
listener = function (event) {
|
||||||
assert.equal(event.data, 'undefined')
|
assert.equal(event.data.isProcessGlobalUndefined, true)
|
||||||
b.close()
|
b.close()
|
||||||
done()
|
done()
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ describe('chromium feature', function () {
|
||||||
it('disables node integration when it is disabled on the parent window', function (done) {
|
it('disables node integration when it is disabled on the parent window', function (done) {
|
||||||
var b
|
var b
|
||||||
listener = function (event) {
|
listener = function (event) {
|
||||||
assert.equal(event.data, 'undefined')
|
assert.equal(event.data.isProcessGlobalUndefined, true)
|
||||||
b.close()
|
b.close()
|
||||||
done()
|
done()
|
||||||
}
|
}
|
||||||
|
|
2
spec/fixtures/pages/window-opener-node.html
vendored
2
spec/fixtures/pages/window-opener-node.html
vendored
|
@ -1,7 +1,7 @@
|
||||||
<html>
|
<html>
|
||||||
<body>
|
<body>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
window.opener.postMessage(typeof process, '*')
|
window.opener.postMessage({isProcessGlobalUndefined: typeof process === 'undefined'}, '*')
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue