Also fix setInterval for #481.
This commit is contained in:
Родитель
b139d97f3d
Коммит
382dbb500c
|
@ -32,3 +32,4 @@ global.clearImmediate = timers.clearImmediate
|
|||
# timeout in browser process.
|
||||
if process.type is 'browser'
|
||||
global.setTimeout = wrapWithActivateUvLoop timers.setTimeout
|
||||
global.setInterval = wrapWithActivateUvLoop timers.setInterval
|
||||
|
|
|
@ -69,6 +69,13 @@ describe 'node feature', ->
|
|||
it 'can be scheduled in time', (done) ->
|
||||
remote.getGlobal('setTimeout')(done, 0)
|
||||
|
||||
describe 'setInterval called under Chromium event loop in browser process', ->
|
||||
it 'can be scheduled in time', (done) ->
|
||||
clear = ->
|
||||
remote.getGlobal('clearInterval')(interval)
|
||||
done()
|
||||
interval = remote.getGlobal('setInterval')(clear, 0)
|
||||
|
||||
describe 'message loop', ->
|
||||
describe 'process.nextTick', ->
|
||||
it 'emits the callback', (done) ->
|
||||
|
|
Загрузка…
Ссылка в новой задаче