Skip to content

Commit

Permalink
chore: set fixtures to contentIsolation: false, update deprecation lo…
Browse files Browse the repository at this point in the history
…g number
  • Loading branch information
VerteDinde committed Mar 3, 2021
1 parent 86bffe8 commit f60fdbc
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 12 deletions.
2 changes: 1 addition & 1 deletion test/application-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('application loading', function () {
it('gets the render process console logs and clears them', async function () {
await app.client.waitUntilWindowLoaded();
let logs = await app.client.getRenderProcessLogs();
expect(logs.length).to.equal(2);
expect(logs.length).to.equal(3);
expect(logs[0].message).to.contain('7:14 "render warn"');
expect(logs[0].source).to.equal('console-api');
expect(logs[0].level).to.equal('WARNING');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/accessible/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -9,7 +10,8 @@ app.on('ready', function () {
height: 600,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/app/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow, ipcMain } = require('electron');
require('@electron/remote/main').initialize();
const fs = require('fs');
const path = require('path');

Expand All @@ -20,7 +21,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
enableRemoteModule: true,
nodeIntegration: true
nodeIntegration: true,
contextIsolation: false,
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/example/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -11,7 +12,8 @@ app.on('ready', function () {
minWidth: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false,
}
});
mainWindow.loadFile('index.html');
Expand Down
7 changes: 5 additions & 2 deletions test/fixtures/multi-window/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let topWindow = null;
let bottomWindow = null;
Expand All @@ -11,7 +12,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
topWindow.loadFile('index-top.html');
Expand All @@ -26,7 +28,8 @@ app.on('ready', function () {
height: 50,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
bottomWindow.loadFile('index-bottom.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/no-node-integration/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -10,7 +11,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
nodeIntegration: false,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
6 changes: 4 additions & 2 deletions test/fixtures/not-accessible/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -9,8 +10,9 @@ app.on('ready', function () {
height: 600,
webPreferences: {
nodeIntegration: true,
webviewTag: true,
enableRemoteModule: true
contextIsolation: false,
enableRemoteModule: true,
webviewTag: true
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/require-name/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();
const path = require('path');

let mainWindow = null;
Expand All @@ -12,7 +13,8 @@ app.on('ready', function () {
webPreferences: {
nodeIntegration: false,
preload: path.join(__dirname, 'preload.js'),
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/slow/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -10,7 +11,8 @@ app.on('ready', function () {
height: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true
enableRemoteModule: true,
contextIsolation: false
}
});
mainWindow.loadFile('index.html');
Expand Down
4 changes: 3 additions & 1 deletion test/fixtures/web-view/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow } = require('electron');
require('@electron/remote/main').initialize();

let mainWindow = null;

Expand All @@ -11,8 +12,9 @@ app.on('ready', function () {
minWidth: 100,
webPreferences: {
nodeIntegration: true,
enableRemoteModule: true,
contextIsolation: false,
webviewTag: true,
enableRemoteModule: true
}
});
mainWindow.loadFile('index.html');
Expand Down

0 comments on commit f60fdbc

Please sign in to comment.