summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html')
-rw-r--r--testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html b/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html
new file mode 100644
index 0000000000..718cadffc7
--- /dev/null
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-registerprocessor-called-on-globalthis.https.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>
+ Test AudioWorkletGlobalScope's registerProcessor() called on globalThis
+ </title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/webaudio/resources/audit.js"></script>
+ </head>
+ <body>
+ <script id="layout-test-code">
+ const audit = Audit.createTaskRunner();
+ const realtimeContext = new AudioContext();
+ const filePath = 'processors/dummy-processor-globalthis.js';
+
+ audit.define('registerprocessor-called-on-globalthis', (task, should) => {
+ realtimeContext.audioWorklet.addModule(filePath).then(() => {
+ const dummyWorkletNode = new AudioWorkletNode(realtimeContext, 'dummy-globalthis');
+ should(dummyWorkletNode instanceof AudioWorkletNode,
+ '"dummyWorkletNode" is an instance of AudioWorkletNode').beTrue();
+ task.done();
+ });
+ });
+
+ audit.run();
+ </script>
+ </body>
+</html>