add test
This commit is contained in:
parent
ff51e4033a
commit
cc7040d75f
2 changed files with 9 additions and 1 deletions
|
@ -122,7 +122,7 @@ Object.defineProperty window.history, 'length',
|
||||||
Object.defineProperty document, 'hidden',
|
Object.defineProperty document, 'hidden',
|
||||||
get: ->
|
get: ->
|
||||||
currentWindow = remote.getCurrentWindow()
|
currentWindow = remote.getCurrentWindow()
|
||||||
!currentWindow.isFocused() || !currentWindow.isVisible()
|
currentWindow.isMinimized() || !currentWindow.isVisible()
|
||||||
|
|
||||||
Object.defineProperty document, 'visibilityState',
|
Object.defineProperty document, 'visibilityState',
|
||||||
get: ->
|
get: ->
|
||||||
|
|
|
@ -45,6 +45,14 @@ describe 'chromium feature', ->
|
||||||
done()
|
done()
|
||||||
w.loadURL url
|
w.loadURL url
|
||||||
|
|
||||||
|
it 'is set correctly when window is inactive', (done) ->
|
||||||
|
w = new BrowserWindow(show:false)
|
||||||
|
w.webContents.on 'ipc-message', (event, args) ->
|
||||||
|
assert.deepEqual args, ['hidden', false]
|
||||||
|
done()
|
||||||
|
w.showInactive()
|
||||||
|
w.loadURL url
|
||||||
|
|
||||||
xdescribe 'navigator.webkitGetUserMedia', ->
|
xdescribe 'navigator.webkitGetUserMedia', ->
|
||||||
it 'calls its callbacks', (done) ->
|
it 'calls its callbacks', (done) ->
|
||||||
@timeout 5000
|
@timeout 5000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue