test: make a few tests hide their windows (#25466)

This commit is contained in:
Cheng Zhao
2020-09-16 03:48:12 +09:00
committed by GitHub
parent 45170fdbd7
commit 2091fd7dd9

View File

@@ -222,7 +222,7 @@ describe('web security', () => {
});
it('engages CORB when web security is not disabled', async () => {
const w = new BrowserWindow({ show: true, webPreferences: { webSecurity: true, nodeIntegration: true } });
const w = new BrowserWindow({ show: false, webPreferences: { webSecurity: true, nodeIntegration: true } });
const p = emittedOnce(ipcMain, 'success');
await w.loadURL(`data:text/html,<script>
const s = document.createElement('script')
@@ -236,7 +236,7 @@ describe('web security', () => {
});
it('bypasses CORB when web security is disabled', async () => {
const w = new BrowserWindow({ show: true, webPreferences: { webSecurity: false, nodeIntegration: true } });
const w = new BrowserWindow({ show: false, webPreferences: { webSecurity: false, nodeIntegration: true } });
const p = emittedOnce(ipcMain, 'success');
await w.loadURL(`data:text/html,
<script>
@@ -247,7 +247,7 @@ describe('web security', () => {
});
it('does not crash when multiple WebContent are created with web security disabled', () => {
const options = { webPreferences: { webSecurity: false } };
const options = { show: false, webPreferences: { webSecurity: false } };
const w1 = new BrowserWindow(options);
w1.loadURL(serverUrl);
const w2 = new BrowserWindow(options);