feat: enable context isolation by default (#26890)
* feat: enable context isolation by default * chore: set default in ctx iso getter * spec: make all specs work with the new contextIsolation default * spec: fix affinity specs * spec: update tests for new ctx iso default * spec: update tests for new ctx iso default * spec: update tests for new ctx iso default * spec: update tests for new ctx iso default * chore: move stray prod deps to dev deps * spec: update tests for new ctx iso default * turn off contextIsolation for visibility tests * turn off contextIsolation for <webview> tag nodeintegration attribute loads native modules when navigation happens Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
parent
2d0ad0b96a
commit
186301e126
37 changed files with 291 additions and 194 deletions
|
@ -181,6 +181,7 @@ describe('chromium feature', () => {
|
|||
const webview = new WebView();
|
||||
const consoleMessage = waitForEvent(webview, 'console-message');
|
||||
webview.allowpopups = true;
|
||||
webview.setAttribute('webpreferences', 'contextIsolation=no');
|
||||
webview.src = url.format({
|
||||
pathname: `${fixtures}/pages/webview-opener-postMessage.html`,
|
||||
protocol: 'file',
|
||||
|
@ -266,7 +267,7 @@ describe('chromium feature', () => {
|
|||
const webview = new WebView();
|
||||
const eventPromise = waitForEvent(webview, 'ipc-message');
|
||||
webview.src = `file://${fixtures}/pages/worker.html`;
|
||||
webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker');
|
||||
webview.setAttribute('webpreferences', 'nodeIntegration, nodeIntegrationInWorker, contextIsolation=no');
|
||||
document.body.appendChild(webview);
|
||||
const event = await eventPromise;
|
||||
webview.remove();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue