chore: fix bounds for webview spec

This commit is contained in:
deepak1556
2025-08-28 11:49:23 +09:00
parent cacb114c8c
commit 89ac52f171

View File

@@ -1,4 +1,4 @@
import { BrowserWindow, session, ipcMain, app, WebContents } from 'electron/main';
import { BrowserWindow, session, ipcMain, app, WebContents, screen } from 'electron/main';
import * as auth from 'basic-auth';
import { expect } from 'chai';
@@ -782,6 +782,7 @@ describe('<webview> tag', function () {
let w: BrowserWindow;
before(async () => {
const display = screen.getPrimaryDisplay();
w = new BrowserWindow({
webPreferences: {
webviewTag: true,
@@ -789,6 +790,7 @@ describe('<webview> tag', function () {
contextIsolation: false
}
});
w.setBounds(display.bounds);
await w.loadURL(`file://${fixtures}/pages/flex-webview.html`);
w.setBackgroundColor(WINDOW_BACKGROUND_COLOR);
});