Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: http3 OR http2
- Manifest: parser/htmlparser/tests/mochitest/mochitest.toml
<!DOCTYPE HTML>
<html>
<head>
<title>Base with base-uri CSP</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<!-- Set CSP -->
<meta http-equiv="Content-Security-Policy" content="base-uri 'self';">
<!-- Base should be ignored -->
</head>
<body>
<img src="/tests/parser/htmlparser/tests/mochitest/file_base_csp_img.sjs?image" width=10 height=10>
<script>
add_task(async function() {
let response = await fetch(
);
let hosts = await response.json();
is(hosts.length, 1, "One host");
is(hosts[0], "mochi.test", "Host was not influenced by base");
info("finished");
});
</script>
</body>
</html>