Browse Source

spec: openDevTools should not crash for frameless window

Cheng Zhao 6 years ago
parent
commit
7eff91dde1
1 changed files with 8 additions and 0 deletions
  1. 8 0
      spec/api-browser-window-spec.js

+ 8 - 0
spec/api-browser-window-spec.js

@@ -839,6 +839,14 @@ describe('BrowserWindow module', () => {
     })
   })
 
+  describe('BrowserWindow.openDevTools()', () => {
+    it('does not crash for frameless window', () => {
+      w.destroy()
+      w = new BrowserWindow({ show: false })
+      w.openDevTools()
+    })
+  })
+
   describe('BrowserWindow.fromBrowserView(browserView)', () => {
     let bv = null