Skip to content

Commit f60fdbc

Browse files
committed
chore: set fixtures to contentIsolation: false, update deprecation log number
1 parent 86bffe8 commit f60fdbc

File tree

10 files changed

+31
-12
lines changed

10 files changed

+31
-12
lines changed

test/application-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ describe('application loading', function () {
149149
it('gets the render process console logs and clears them', async function () {
150150
await app.client.waitUntilWindowLoaded();
151151
let logs = await app.client.getRenderProcessLogs();
152-
expect(logs.length).to.equal(2);
152+
expect(logs.length).to.equal(3);
153153
expect(logs[0].message).to.contain('7:14 "render warn"');
154154
expect(logs[0].source).to.equal('console-api');
155155
expect(logs[0].level).to.equal('WARNING');

test/fixtures/accessible/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let mainWindow = null;
45

@@ -9,7 +10,8 @@ app.on('ready', function () {
910
height: 600,
1011
webPreferences: {
1112
nodeIntegration: true,
12-
enableRemoteModule: true
13+
enableRemoteModule: true,
14+
contextIsolation: false
1315
}
1416
});
1517
mainWindow.loadFile('index.html');

test/fixtures/app/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow, ipcMain } = require('electron');
2+
require('@electron/remote/main').initialize();
23
const fs = require('fs');
34
const path = require('path');
45

@@ -20,7 +21,8 @@ app.on('ready', function () {
2021
height: 100,
2122
webPreferences: {
2223
enableRemoteModule: true,
23-
nodeIntegration: true
24+
nodeIntegration: true,
25+
contextIsolation: false,
2426
}
2527
});
2628
mainWindow.loadFile('index.html');

test/fixtures/example/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let mainWindow = null;
45

@@ -11,7 +12,8 @@ app.on('ready', function () {
1112
minWidth: 100,
1213
webPreferences: {
1314
nodeIntegration: true,
14-
enableRemoteModule: true
15+
enableRemoteModule: true,
16+
contextIsolation: false,
1517
}
1618
});
1719
mainWindow.loadFile('index.html');

test/fixtures/multi-window/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let topWindow = null;
45
let bottomWindow = null;
@@ -11,7 +12,8 @@ app.on('ready', function () {
1112
height: 100,
1213
webPreferences: {
1314
nodeIntegration: true,
14-
enableRemoteModule: true
15+
enableRemoteModule: true,
16+
contextIsolation: false
1517
}
1618
});
1719
topWindow.loadFile('index-top.html');
@@ -26,7 +28,8 @@ app.on('ready', function () {
2628
height: 50,
2729
webPreferences: {
2830
nodeIntegration: true,
29-
enableRemoteModule: true
31+
enableRemoteModule: true,
32+
contextIsolation: false
3033
}
3134
});
3235
bottomWindow.loadFile('index-bottom.html');

test/fixtures/no-node-integration/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let mainWindow = null;
45

@@ -10,7 +11,8 @@ app.on('ready', function () {
1011
height: 100,
1112
webPreferences: {
1213
nodeIntegration: false,
13-
enableRemoteModule: true
14+
enableRemoteModule: true,
15+
contextIsolation: false
1416
}
1517
});
1618
mainWindow.loadFile('index.html');

test/fixtures/not-accessible/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let mainWindow = null;
45

@@ -9,8 +10,9 @@ app.on('ready', function () {
910
height: 600,
1011
webPreferences: {
1112
nodeIntegration: true,
12-
webviewTag: true,
13-
enableRemoteModule: true
13+
contextIsolation: false,
14+
enableRemoteModule: true,
15+
webviewTag: true
1416
}
1517
});
1618
mainWindow.loadFile('index.html');

test/fixtures/require-name/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23
const path = require('path');
34

45
let mainWindow = null;
@@ -12,7 +13,8 @@ app.on('ready', function () {
1213
webPreferences: {
1314
nodeIntegration: false,
1415
preload: path.join(__dirname, 'preload.js'),
15-
enableRemoteModule: true
16+
enableRemoteModule: true,
17+
contextIsolation: false
1618
}
1719
});
1820
mainWindow.loadFile('index.html');

test/fixtures/slow/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let mainWindow = null;
45

@@ -10,7 +11,8 @@ app.on('ready', function () {
1011
height: 100,
1112
webPreferences: {
1213
nodeIntegration: true,
13-
enableRemoteModule: true
14+
enableRemoteModule: true,
15+
contextIsolation: false
1416
}
1517
});
1618
mainWindow.loadFile('index.html');

test/fixtures/web-view/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const { app, BrowserWindow } = require('electron');
2+
require('@electron/remote/main').initialize();
23

34
let mainWindow = null;
45

@@ -11,8 +12,9 @@ app.on('ready', function () {
1112
minWidth: 100,
1213
webPreferences: {
1314
nodeIntegration: true,
15+
enableRemoteModule: true,
16+
contextIsolation: false,
1417
webviewTag: true,
15-
enableRemoteModule: true
1618
}
1719
});
1820
mainWindow.loadFile('index.html');

0 commit comments

Comments
 (0)