Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Errors
- This test gets skipped with pattern: http3 OR http2
- This test failed 8 times in the preceding 30 days. quicksearch this test
- Manifest: dom/reporting/tests/mochitest.toml
<!DOCTYPE HTML>
<html>
<head>
<title>Test for delivering reports</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript">
// Setting prefs.
SpecialPowers.pushPrefEnv({ set: [
["dom.reporting.delivering.timeout", 1],
["dom.reporting.delivering.maxFailures", 2],
["dom.reporting.delivering.maxReports", 3],
]})
// Tests run in iframes because the origin must be secure for report-to header.
.then(_ => {
window.addEventListener("message", e => {
if (e.data.type == "finish") {
SimpleTest.finish();
return;
}
if (e.data.type == "test") {
ok(e.data.check, e.data.msg);
return;
}
ok(false, "Invalid message");
});
let ifr = document.createElement("iframe");
document.body.appendChild(ifr);
});
SimpleTest.waitForExplicitFinish();
</script>
</body>
</html>