Merge pull request #8038 from electron/danhp/close-file-preview

Add 'win.closeFilePreview()'
This commit is contained in:
Kevin Sawicki 2016-11-28 14:47:06 -08:00 committed by GitHub
commit 774b2f99f2
8 changed files with 34 additions and 0 deletions

View file

@ -1718,6 +1718,17 @@ describe('browser-window module', function () {
})
})
describe('previewFile', function () {
it('opens the path in Quick Look on macOS', function () {
if (process.platform !== 'darwin') return this.skip()
assert.doesNotThrow(function () {
w.previewFile(__filename)
w.closeFilePreview()
})
})
})
describe('offscreen rendering', function () {
this.timeout(10000)