mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
15a5560a3d
Differential Revision: https://phabricator.services.mozilla.com/D183645
33 lines
828 B
HTML
33 lines
828 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test fetch an child module script with an invalid uri 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();
|
|
ok(!!audioContext.audioWorklet, "audioContext.audioWorklet exists");
|
|
|
|
audioContext.audioWorklet.addModule("specifier_with_user.mjs")
|
|
.then(() => {
|
|
ok(false, "Error: load shouldn't succeed.");
|
|
}, () => {
|
|
ok(true, "OK: load should fail.");
|
|
})
|
|
|
|
// done
|
|
.then(() => {
|
|
SimpleTest.finish();
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|