summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/extended-audioworkletnode-with-parameters.https.html
blob: 75f4aa4020d303c91209d1de4f6efb127b5f3eb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!doctype html>
<title>Test AudioWorkletNode subclass with parameters</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
class Extended extends AudioWorkletNode {}

const modulePath = 'processors/gain-processor.js';

promise_test(async () => {
  const context = new AudioContext();
  await context.audioWorklet.addModule(modulePath);
  const node = new Extended(context, 'gain');
  assert_equals(Object.getPrototypeOf(node), Extended.prototype);
});
</script>