|
@@ -5091,6 +5091,55 @@ describe('BrowserWindow module', () => {
|
|
|
w.setContentSize(10, 10);
|
|
|
expectBoundsEqual(w.getContentSize(), [10, 10]);
|
|
|
});
|
|
|
+
|
|
|
+ ifit(process.platform === 'win32')('do not change window with frame bounds when maximized', () => {
|
|
|
+ const w = new BrowserWindow({
|
|
|
+ show: true,
|
|
|
+ frame: true,
|
|
|
+ thickFrame: true
|
|
|
+ });
|
|
|
+ expect(w.isResizable()).to.be.true('resizable');
|
|
|
+ w.maximize();
|
|
|
+ expect(w.isMaximized()).to.be.true('maximized');
|
|
|
+ const bounds = w.getBounds();
|
|
|
+ w.setResizable(false);
|
|
|
+ expectBoundsEqual(w.getBounds(), bounds);
|
|
|
+ w.setResizable(true);
|
|
|
+ expectBoundsEqual(w.getBounds(), bounds);
|
|
|
+ });
|
|
|
+
|
|
|
+ ifit(process.platform === 'win32')('do not change window without frame bounds when maximized', () => {
|
|
|
+ const w = new BrowserWindow({
|
|
|
+ show: true,
|
|
|
+ frame: false,
|
|
|
+ thickFrame: true
|
|
|
+ });
|
|
|
+ expect(w.isResizable()).to.be.true('resizable');
|
|
|
+ w.maximize();
|
|
|
+ expect(w.isMaximized()).to.be.true('maximized');
|
|
|
+ const bounds = w.getBounds();
|
|
|
+ w.setResizable(false);
|
|
|
+ expectBoundsEqual(w.getBounds(), bounds);
|
|
|
+ w.setResizable(true);
|
|
|
+ expectBoundsEqual(w.getBounds(), bounds);
|
|
|
+ });
|
|
|
+
|
|
|
+ ifit(process.platform === 'win32')('do not change window transparent without frame bounds when maximized', () => {
|
|
|
+ const w = new BrowserWindow({
|
|
|
+ show: true,
|
|
|
+ frame: false,
|
|
|
+ thickFrame: true,
|
|
|
+ transparent: true
|
|
|
+ });
|
|
|
+ expect(w.isResizable()).to.be.true('resizable');
|
|
|
+ w.maximize();
|
|
|
+ expect(w.isMaximized()).to.be.true('maximized');
|
|
|
+ const bounds = w.getBounds();
|
|
|
+ w.setResizable(false);
|
|
|
+ expectBoundsEqual(w.getBounds(), bounds);
|
|
|
+ w.setResizable(true);
|
|
|
+ expectBoundsEqual(w.getBounds(), bounds);
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
describe('loading main frame state', () => {
|