Update web-platform-tests to revision fd0429f0b45f975b25d85256dac33762134952c5

This commit is contained in:
WPT Sync Bot 2019-04-15 21:58:05 -04:00
parent 0ba7da4431
commit c8202ddbe1
50 changed files with 1210 additions and 191 deletions

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html>
<head>
<title>
Test if activation of worklet thread does not resume context rendering.
</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 context = new AudioContext();
const filePath = 'processors/dummy-processor.js';
// Suspends the context right away and then activate worklet. The current
// time must not advance since the context is suspended.
audit.define(
{label: 'load-worklet-and-suspend'},
async (task, should) => {
context.suspend();
const suspendTime = context.currentTime;
await context.audioWorklet.addModule(filePath);
const dummy = new AudioWorkletNode(context, 'dummy');
dummy.connect(context.destination);
task.timeout(() => {
should(context.currentTime, 'context.currentTime')
.beEqualTo(suspendTime);
should(context.state, 'context.state').beEqualTo('suspended');
task.done();
}, 1000);
});
audit.run();
</script>
</body>
</html>