Compare commits

..

1 Commits

Author SHA1 Message Date
Shelley Vohr
e611947ce5 asdfghjkl 2024-02-10 22:27:07 +01:00
2 changed files with 8 additions and 11 deletions

View File

@@ -6,7 +6,7 @@
:memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪.
View these docs in other languages on our [Crowdin](https://crowdin.com/project/electron) project.
sss
The Electron framework lets you write cross-platform desktop applications
using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
[Chromium](https://www.chromium.org) and is used by the [Visual Studio

View File

@@ -4178,15 +4178,14 @@ describe('BrowserWindow module', () => {
});
it('returns false when the window is only partially obscured', async () => {
const w1 = new BrowserWindow({ x: 250, y: 250, width: 400, height: 400 });
const w2 = new BrowserWindow({ show: false, x: 200, y: 200, width: 500, height: 500 });
const w1 = new BrowserWindow({ width: 400, height: 400 });
const w2 = new BrowserWindow({ show: false, width: 450, height: 450 });
const focused = once(w2, 'focus');
w2.show();
await focused;
await setTimeout(2000);
console.log(w1.getBounds(), w2.getBounds());
await setTimeout(1000);
expect(w1.isOccluded()).to.be.true('window is not occluded');
const pos = w2.getPosition();
@@ -4194,8 +4193,7 @@ describe('BrowserWindow module', () => {
w2.setPosition(pos[0] - 100, pos[1]);
await move;
await setTimeout(2000);
console.log(w1.getBounds(), w2.getBounds());
await setTimeout(1000);
expect(w1.isOccluded()).to.be.false('window is occluded');
});
@@ -4213,15 +4211,14 @@ describe('BrowserWindow module', () => {
});
it('returns true for an obscured window', async () => {
const w1 = new BrowserWindow({ x: 200, y: 200, width: 200, height: 200 });
const w2 = new BrowserWindow({ show: false, x: 100, y: 100, width: 800, height: 800 });
const w1 = new BrowserWindow({ width: 200, height: 200 });
const w2 = new BrowserWindow({ show: false });
const focused = once(w2, 'focus');
w2.show();
await focused;
await setTimeout(2000);
console.log(w1.getBounds(), w2.getBounds());
await setTimeout(1000);
expect(w1.isOccluded()).to.be.true('visible window');
});
});