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