<!doctype html>
<html>
<head>
<title>Test GC of Stopped ConstantSourceNode </title>
<script src="../../resources/gc.js"></script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../resources/audit-util.js"></script>
<script src="../resources/audit.js"></script>
<script src="stopped-source-test.js"></script>
</head>
<body>
<script>
let audit = Audit.createTaskRunner();
const nodesToTest = 100;
let context = null;
audit.define('Test GC of Stopped ConstantSourceNodes', (task, should) => {
context = new AudioContext();
testStoppedSourceGC(task, should, {
context: context,
nodeName: 'ConstantSourceNode',
constructorMethod: () => {
return new ConstantSourceNode(context);
},
numberOfNodes: 100
});
});
audit.define('close context after test', async (task) => {
await context.close();
task.done();
});
audit.run();
</script>
</body>
</html>