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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/note-grain-on-timing.html

Issue 2581463002: Refactor WebAudio test directory (Closed)
Patch Set: Use correct path for wav result files Created 4 years 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 <script src="resources/compatibility.js"></script>
6 <script src="resources/audit-util.js"></script>
7 <script src="resources/audio-testing.js"></script>
8 <script src="resources/note-grain-on-testing.js"></script>
9 </head>
10
11 <body>
12 <div id="description"></div>
13 <div id="console"></div>
14
15 <script>
16 description("Test timing of noteGrainOn.");
17
18 var squarePulseBuffer;
19
20 function checkResult(event) {
21 var buffer = event.renderedBuffer;
22 renderedData = buffer.getChannelData(0);
23 var nSamples = renderedData.length;
24
25 var success = true;
26
27 var startEndFrames = findStartAndEndSamples(renderedData);
28
29 success = success && verifyStartAndEndFrames(startEndFrames);
30
31 if (success) {
32 testPassed("noteGrainOn timing tests passed.");
33 } else {
34 testFailed("noteGrainOn timing tests failed.");
35 }
36
37 finishJSTest();
38 }
39
40 function runTest() {
41 if (window.testRunner) {
42 testRunner.dumpAsText();
43 testRunner.waitUntilDone();
44 }
45
46 window.jsTestIsAsync = true;
47
48 // Create offline audio context.
49 context = new OfflineAudioContext(2, sampleRate * renderTime, sampleRa te);
50
51 squarePulseBuffer = createSignalBuffer(context, function (k) { return 1 });
52
53 playAllGrains(context, squarePulseBuffer, numberOfTests);
54
55 context.oncomplete = checkResult;
56 context.startRendering();
57 }
58
59 runTest();
60 successfullyParsed = true;
61
62 </script>
63
64 </body>
65 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698