Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: verify
- Manifest: dom/worklet/tests/mochitest.toml
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Worklet</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript" src="common.js"></script>
</head>
<body>
<script type="application/javascript">
// This function is called into an iframe.
function runTestInIframe() {
var audioContext = new AudioContext();
function loading() {
audioContext.audioWorklet.addModule("server_import_with_cache.sjs")
.then(() => {
ok(true, "Import should load a resource.");
}, () => {
ok(false, "Import should load a resource.");
})
.then(() => {
done();
});
}
var count = 0;
const MAX = 10;
function done() {
if (++count == MAX) {
SimpleTest.finish();
}
}
for (var i = 0; i < MAX; ++i) {
loading();
}
}
</script>
</body>
</html>