2020-03-20 20:28:31 +00:00
|
|
|
const path = require('path');
|
|
|
|
const { remote } = require('electron');
|
|
|
|
const { Buffer } = window;
|
2016-09-08 17:34:09 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
delete window.Buffer;
|
|
|
|
delete global.Buffer;
|
2016-09-08 17:34:09 +00:00
|
|
|
|
|
|
|
// Test that remote.js doesn't use Buffer global
|
2020-05-13 18:05:44 +00:00
|
|
|
if (remote) {
|
|
|
|
remote.require(path.join(__dirname, 'print_name.js')).echo(Buffer.from('bar'));
|
|
|
|
}
|
2016-09-08 17:34:09 +00:00
|
|
|
|
2020-03-20 20:28:31 +00:00
|
|
|
window.test = Buffer.from('buffer');
|