mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
committed by
Samuel Attard
parent
49009236d9
commit
317f0cec68
@@ -21,6 +21,7 @@ module.exports = [
|
||||
{ name: 'inAppPurchase' },
|
||||
{ name: 'Menu' },
|
||||
{ name: 'MenuItem' },
|
||||
{ name: 'nativeTheme' },
|
||||
{ name: 'net' },
|
||||
{ name: 'netLog' },
|
||||
{ name: 'Notification' },
|
||||
|
||||
@@ -153,10 +153,10 @@ describe('remote module', () => {
|
||||
})
|
||||
|
||||
describe('remote modules', () => {
|
||||
it('includes browser process modules as properties', () => {
|
||||
expect(remote.app.getPath).to.be.a('function')
|
||||
expect(remote.webContents.getFocusedWebContents).to.be.a('function')
|
||||
expect(remote.clipboard.readText).to.be.a('function')
|
||||
it('includes browser process modules as properties', async () => {
|
||||
const mainModules = await ipcRenderer.invoke('get-modules')
|
||||
const remoteModules = mainModules.filter(name => remote[name])
|
||||
expect(remoteModules).to.be.deep.equal(mainModules)
|
||||
})
|
||||
|
||||
it('returns toString() of original function via toString()', () => {
|
||||
|
||||
@@ -42,6 +42,8 @@ ipcMain.on('message', function (event, ...args) {
|
||||
event.sender.send('message', ...args)
|
||||
})
|
||||
|
||||
ipcMain.handle('get-modules', () => Object.keys(electron))
|
||||
|
||||
// Set productName so getUploadedReports() uses the right directory in specs
|
||||
if (process.platform !== 'darwin') {
|
||||
crashReporter.productName = 'Zombies'
|
||||
|
||||
Reference in New Issue
Block a user