mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Disable throttling in test windows via WebAudio hack
Throttling in test windows is annoying when tests run interactively, and *seems* to cause issues with animation frames not firing even in headless tests, though it’s difficult to fully confirm since this issue is intermittent.
This commit is contained in:
@@ -57,6 +57,12 @@ module.exports = ({blobStore}) ->
|
||||
|
||||
document.title = "Spec Suite"
|
||||
|
||||
# Avoid throttling of test window by playing silence
|
||||
context = new AudioContext()
|
||||
source = context.createBufferSource()
|
||||
source.connect(context.destination)
|
||||
source.start(0)
|
||||
|
||||
testRunner = require(testRunnerPath)
|
||||
legacyTestRunner = require(legacyTestRunnerPath)
|
||||
buildDefaultApplicationDelegate = -> new ApplicationDelegate()
|
||||
|
||||
Reference in New Issue
Block a user