fix: ensure ready-to-show event is fired (#25448)

* fix: ensure ready-to-show event is fired

* test: acutally draw something when capturePage
This commit is contained in:
Cheng Zhao 2020-09-16 03:48:39 +09:00 committed by GitHub
parent 2091fd7dd9
commit e5933c6910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 2 deletions

View file

@ -1288,7 +1288,7 @@ describe('BrowserWindow module', () => {
it('preserves transparency', async () => {
const w = new BrowserWindow({ show: false, transparent: true });
w.loadURL('about:blank');
w.loadFile(path.join(fixtures, 'pages', 'theme-color.html'));
await emittedOnce(w, 'ready-to-show');
w.show();