Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<html>
<head>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
</head>
<body>
<script>
var image = new Image();
image.src = "./unoptimized-image.jpg";
var check_report_format = (reports, observer) => {
let report = reports[0];
assert_equals(report.type, "document-policy-violation");
assert_equals(report.url, document.location.href);
assert_equals(report.body.featureId, "lossy-images-max-bpp");
assert_equals(report.body.disposition, "enforce");
};
async_test(t => {
new ReportingObserver(t.step_func_done(check_report_format),
{types: ['document-policy-violation'], buffered: true}).observe();
}, "unoptimized-images Report Format");
</script>
</body>
</html>