content/media/test/crashtests/offline-buffer-source-ended-1.html

branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
equal deleted inserted replaced
-1:000000000000 0:f050eebc0ac3
1 <!DOCTYPE html>
2 <html class="reftest-wait">
3 <script>
4 // Currently this test fails unless an extra block is processed after the
5 // BufferSource finishes. 12033 ≡ 1 (mod 128), but the test should pass even
6 // when only 12001 samples are processed.
7 var context = new window.OfflineAudioContext(1, 12033, 12000);
8
9 var source = context.createBufferSource();
10 source.buffer = context.createBuffer(1, 12000, context.sampleRate);
11 source.onended = function(e) {
12 document.documentElement.removeAttribute("class");
13 }
14 source.connect(context.destination);
15 source.start(0);
16
17 context.startRendering();
18 </script>

mercurial