Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
nornagon committed Jul 30, 2020
1 parent eea305e commit aca80e5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions shell/browser/api/electron_api_base_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ void BaseWindow::OnNewWindowForTab() {

#if defined(OS_WIN)
void BaseWindow::OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {
LOG(INFO) << "GOT MESSAGE " << (int)message;
if (IsWindowMessageHooked(message)) {
v8::Isolate* isolate = JavascriptEnvironment::GetIsolate();
v8::Locker locker(isolate);
Expand Down
8 changes: 8 additions & 0 deletions spec-main/api-browser-window-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4319,8 +4319,12 @@ describe('BrowserWindow module', () => {
await messageReceived;
expect(timesCalled).to.equal(1);
}
console.log('before hide/show');
w.hide();
w.show();
console.log('after hide/show');
await delay(100);
console.log('after delay');
expect(timesCalled).to.equal(2);
w.unhookWindowMessage(WM_GETICON);
w.hide();
Expand All @@ -4341,8 +4345,12 @@ describe('BrowserWindow module', () => {
await messageReceived;
expect(timesCalled).to.equal(1);
}
console.log('before hide/show');
w.hide();
w.show();
console.log('after hide/show');
await delay(100);
console.log('after delay');
expect(timesCalled).to.equal(2);
w.unhookAllWindowMessages();
w.hide();
Expand Down

0 comments on commit aca80e5

Please sign in to comment.