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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/offlineaudiodestination.html

Issue 2092033003: Add OfflineAudioDestinationNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Test OfflineAudioDestination</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 <script src="resources/audio-testing.js"></script>
8 <title>Test Automation of Biquad Filters</title>
9 </head>
10 <script>
11 // Don't need to run these tests at high sampling rate, so just use a low
12 // one to reduce memory usage and complexity.
13 var sampleRate = 16000;
14
15 var audit = Audit.createTaskRunner();
16
17 audit.defineTask("test", function (done) {
18 // Create offline context with 7 channels. The number of channels is
19 // arbitrary here.
20 var context = new OfflineAudioContext(7, 1, sampleRate);
21
22 var dest = context.destination;
23
24 // Verify we have the correct values.
25 Should("dest.channelCount", dest.channelCount).beEqualTo(7);
26 Should("dest.maxChannelCount", dest.maxChannelCount).beEqualTo(dest.chan nelCount);
27 Should("dest.channelCountMode", dest.channelCountMode).beEqualTo("explic it");
28
29
30 // Verify that we can't change the channel count and channel mode
31 Should("dest.channelCount = 7", function () {
32 dest.channelCount = 7;
33 }).notThrow();
34
35 Should("dest.channelCount = 3", function () {
36 dest.channelCount = 3;
37 }).throw("NotSupportedError");
38
39 Should('dest.channelCountMode = "explicit"', function () {
40 dest.channelCountMode = "explicit";
41 }).notThrow();
42
43 Should('dest.channelCountMode = "max"', function () {
44 dest.channelCountMode = "max";
45 }).throw("NotSupportedError");
46
47 Should('dest.channelCountMode = "clamped-max"', function () {
48 dest.channelCountMode = "clamped-max";
49 }).throw("NotSupportedError");
50
51 // Verify that we can't change maxChannelCount.
52 dest.maxChannelCount = 14;
53 Should("dest.maxChannelCount = 14", dest.maxChannelCount)
54 .beEqualTo(dest.channelCount);
55 done();
56 });
57
58 audit.runTasks();
59 </script>
60 <body>
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698