test: skip remote module related tests when enable_remote_module = false (#23557)

This commit is contained in:
Milan Burda 2020-05-13 20:05:44 +02:00 committed by GitHub
parent 85fae67966
commit fc468cce3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 13 deletions

View file

@ -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 } });