From 6c40b1eead05f1b9a2b3b5068ebe56ea585dce2d Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 23 Feb 2017 11:35:28 -0800 Subject: [PATCH] Verify global.Buffer is undefined --- spec/fixtures/module/preload-required-module.js | 2 +- spec/webview-spec.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/fixtures/module/preload-required-module.js b/spec/fixtures/module/preload-required-module.js index fbe6f95dc067..1028d55cb0ef 100644 --- a/spec/fixtures/module/preload-required-module.js +++ b/spec/fixtures/module/preload-required-module.js @@ -1,5 +1,5 @@ try { - console.log([typeof process, typeof setImmediate, typeof global, typeof Buffer].join(' ')) + console.log([typeof process, typeof setImmediate, typeof global, typeof Buffer, typeof global.Buffer].join(' ')) } catch (e) { console.log(e.message) } diff --git a/spec/webview-spec.js b/spec/webview-spec.js index c29456b17ea3..93924e036c50 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -193,7 +193,7 @@ describe(' tag', function () { it('preload script can require modules that still use "process" and "Buffer" when nodeintegration is off', function (done) { webview.addEventListener('console-message', function (e) { - assert.equal(e.message, 'object undefined object function') + assert.equal(e.message, 'object undefined object function undefined') done() }) webview.setAttribute('preload', fixtures + '/module/preload-node-off-wrapper.js')