mirror of
https://github.com/electron/electron.git
synced 2026-01-09 07:28:12 -05:00
chore: add deprecation warning for the default of contextIsolation (#23507)
* chore: add deprecation warning for the default of contextIsolation * chore: add to breaking changes * Update docs/breaking-changes.md Co-authored-by: Jeremy Apthorp <jeremya@chromium.org> * chore: fix specs on windows Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
This commit is contained in:
2
spec/fixtures/api/gpu-info.js
vendored
2
spec/fixtures/api/gpu-info.js
vendored
@@ -4,7 +4,7 @@ app.commandLine.appendSwitch('--disable-software-rasterizer');
|
||||
|
||||
app.whenReady().then(() => {
|
||||
const infoType = process.argv.pop();
|
||||
const w = new BrowserWindow({ show: false });
|
||||
const w = new BrowserWindow({ show: false, webPreferences: { contextIsolation: true } });
|
||||
w.webContents.once('did-finish-load', () => {
|
||||
app.getGPUInfo(infoType).then(
|
||||
(gpuInfo) => {
|
||||
|
||||
@@ -28,7 +28,8 @@ app.whenReady().then(() => {
|
||||
win = new BrowserWindow({
|
||||
show: false,
|
||||
webPreferences: {
|
||||
preload: path.resolve(__dirname, 'preload.js')
|
||||
preload: path.resolve(__dirname, 'preload.js'),
|
||||
contextIsolation: true
|
||||
}
|
||||
});
|
||||
win.loadFile('index.html');
|
||||
|
||||
6
spec/fixtures/api/window-all-closed/main.js
vendored
6
spec/fixtures/api/window-all-closed/main.js
vendored
@@ -15,6 +15,10 @@ app.on('quit', () => {
|
||||
});
|
||||
|
||||
app.whenReady().then(() => {
|
||||
const win = new BrowserWindow();
|
||||
const win = new BrowserWindow({
|
||||
webPreferences: {
|
||||
contextIsolation: true
|
||||
}
|
||||
});
|
||||
win.close();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user