diff --git a/spec-main/api-session-spec.js b/spec-main/api-session-spec.js index e1da8c5d42ca..71a4dd006883 100644 --- a/spec-main/api-session-spec.js +++ b/spec-main/api-session-spec.js @@ -265,7 +265,7 @@ describe('session module', () => { let customSession = null const protocol = session.defaultSession.protocol const handler = (ignoredError, callback) => { - callback({ data: 'test', mimeType: 'text/html' }) + callback({ data: ``, mimeType: 'text/html' }) } beforeEach(async () => { @@ -273,7 +273,8 @@ describe('session module', () => { w = new BrowserWindow({ show: false, webPreferences: { - partition: partitionName + partition: partitionName, + nodeIntegration: true, } }) customSession = session.fromPartition(partitionName) @@ -294,8 +295,8 @@ describe('session module', () => { }) it('handles requests from partition', async () => { - await w.loadURL(`${protocolName}://fake-host`) - expect(await w.webContents.executeJavaScript('document.body.textContent')).to.equal('test') + w.loadURL(`${protocolName}://fake-host`) + await emittedOnce(ipcMain, 'hello') }) })