Skip to content

Commit

Permalink
Migrate font-display to document policy
Browse files Browse the repository at this point in the history
This CL migrates font-display from feature policy to document policy.

Bug: 993790
Change-Id: Id4c822e0a42594ab75919819e4f1b78ca6a263f3
  • Loading branch information
Charlie Hu authored and chromium-wpt-export-bot committed Feb 20, 2020
1 parent 58988ab commit ef6e1b4
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 85 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>Test for font-display-late-swap feature policy set to report-only</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#reporting">
<link rel="help" href="https://github.com/w3c/webappsec-feature-policy/blob/master/policies/font-display-late-swap.md">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<style>
Expand Down Expand Up @@ -52,7 +52,7 @@
let check_report_format = (reports, observer) => {
reportCounter -= reports.length;
for (let report of reports) {
assert_equals(report.type, 'feature-policy-violation');
assert_equals(report.type, 'document-policy-violation');
assert_equals(report.url, document.location.href, 'Report URL');
assert_equals(report.body.featureId, 'font-display-late-swap');
assert_equals(report.body.disposition, 'report');
Expand All @@ -66,7 +66,7 @@
};

new ReportingObserver(t.step_func(check_report_format),
{types: ['feature-policy-violation'], buffered: true}).observe();
{types: ['document-policy-violation'], buffered: true}).observe();
</script>
</body>
</html>
@@ -0,0 +1 @@
Document-Policy-Report-Only: no-font-display-late-swap
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>Test for font-display-late-swap feature policy set to reporting</title>
<link rel="help" href="https://w3c.github.io/webappsec-feature-policy/#reporting">
<link rel="help" href="https://github.com/w3c/webappsec-feature-policy/blob/master/policies/font-display-late-swap.md">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<style>
Expand Down Expand Up @@ -52,7 +52,7 @@
let check_report_format = (reports, observer) => {
reportCounter -= reports.length;
for (let report of reports) {
assert_equals(report.type, 'feature-policy-violation');
assert_equals(report.type, 'document-policy-violation');
assert_equals(report.url, document.location.href, 'Report URL');
assert_equals(report.body.featureId, 'font-display-late-swap');
assert_equals(report.body.disposition, 'enforce');
Expand All @@ -66,7 +66,7 @@
};

new ReportingObserver(t.step_func(check_report_format),
{types: ['feature-policy-violation'], buffered: true}).observe();
{types: ['document-policy-violation'], buffered: true}).observe();
</script>
</body>
</html>
@@ -0,0 +1 @@
Document-Policy: no-font-display-late-swap

0 comments on commit ef6e1b4

Please sign in to comment.