Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/manifest/test/mochitest.toml
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<meta charset="utf-8">
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
<script>
"use strict";
SimpleTest.waitForExplicitFinish();
async function run() {
const prefSetting = [
{ manifest: true, modulepreload: true },
{ manifest: true, modulepreload: false },
{ manifest: false, modulepreload: true },
{ manifest: false, modulepreload: false },
];
for (const { manifest, modulepreload } of prefSetting) {
await SpecialPowers.pushPrefEnv({
set: [
["dom.manifest.enabled", manifest],
["network.modulepreload", modulepreload],
],
});
const { relList } = document.createElement("link");
is(
relList.supports("manifest"),
manifest,
`Expected manifest to be ${manifest}`
);
is(
relList.supports("modulepreload"),
modulepreload,
`Expected preload to be ${modulepreload}`
);
}
}
run()
.catch(console.error)
.finally(() => SimpleTest.finish());
</script>
</head>