Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: LayoutTests/webaudio/resources/mediaelementaudiosourcenode-test.js

Issue 520433002: Output silence if the MediaElementAudioSourceNode has a different origin (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use correct names for the test files. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Test MediaStreamAudioSourceNode's with different URLs.
2 //
3 var context = 0;
4 var lengthInSeconds = 1;
5 var sampleRate = 44100;
6 var source = 0;
7 var audio = 0;
8 var actualBuffer = 0;
9
10 // Create an MediaElementSource node with the given |url| and connect it to weba udio.
11 // |oncomplete| is given the completion event to check the result.
12 function runTest (url, oncomplete)
13 {
14 if (window.testRunner) {
15 testRunner.dumpAsText();
16 testRunner.waitUntilDone();
17 }
18
19 window.jsTestIsAsync = true;
20
21 context = new OfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRat e);
22 audio = document.createElement('audio');
23 audio.src = url;
24 source = context.createMediaElementSource(audio);
25 source.connect(context.destination);
26
27 audio.addEventListener("playing", function(e) {
28 context.startRendering();
29 });
30
31 context.oncomplete = function(e) {
32 checkResult(e);
33 finishJSTest();
34 }
35
36 audio.play();
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698