test: skip remote module related tests when enable_remote_module = false (#23557)
This commit is contained in:
parent
85fae67966
commit
fc468cce3b
4 changed files with 20 additions and 13 deletions
|
@ -2,8 +2,11 @@ import * as path from 'path';
|
|||
import { BrowserWindow, session, ipcMain, app, WebContents } from 'electron/main';
|
||||
import { closeAllWindows } from './window-helpers';
|
||||
import { emittedOnce } from './events-helpers';
|
||||
import { ifdescribe } from './spec-helpers';
|
||||
import { expect } from 'chai';
|
||||
|
||||
const features = process.electronBinding('features');
|
||||
|
||||
async function loadWebView (w: WebContents, attributes: Record<string, string>, openDevTools: boolean = false): Promise<void> {
|
||||
await w.executeJavaScript(`
|
||||
new Promise((resolve, reject) => {
|
||||
|
@ -570,7 +573,7 @@ describe('<webview> tag', function () {
|
|||
});
|
||||
});
|
||||
|
||||
describe('enableremotemodule attribute', () => {
|
||||
ifdescribe(features.isRemoteModuleEnabled())('enableremotemodule attribute', () => {
|
||||
let w: BrowserWindow;
|
||||
beforeEach(async () => {
|
||||
w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, webviewTag: true } });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue