Bug 1492036 - Reporting API - part 7 - WPTs, r=smaug
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 14 Nov 2018 20:02:33 +0100
changeset 446486 6119216d9038e35089b6d5a23a3d9a0deb1b8416
parent 446485 ed3b5f933b97dc43e40fa153a03c4a55e830e7cf
child 446487 2751ee1bdac688b2a7b83114975ea3dc4e772327
push id35042
push useraiakab@mozilla.com
push dateThu, 15 Nov 2018 09:54:38 +0000
treeherdermozilla-central@dca9c72df68b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1492036
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1492036 - Reporting API - part 7 - WPTs, r=smaug
testing/web-platform/meta/feature-policy/__dir__.ini
testing/web-platform/meta/feature-policy/idlharness.window.js.ini
testing/web-platform/meta/feature-policy/reporting/camera-reporting.https.html.ini
testing/web-platform/meta/feature-policy/reporting/document-write-reporting.html.ini
testing/web-platform/meta/feature-policy/reporting/encrypted-media-reporting.https.html.ini
testing/web-platform/meta/feature-policy/reporting/fullscreen-reporting.html.ini
testing/web-platform/meta/feature-policy/reporting/geolocation-reporting.https.html.ini
testing/web-platform/meta/feature-policy/reporting/microphone-reporting.https.html.ini
testing/web-platform/meta/feature-policy/reporting/midi-reporting.html.ini
testing/web-platform/meta/feature-policy/reporting/payment-reporting.https.html.ini
testing/web-platform/meta/feature-policy/reporting/sync-xhr-reporting.html.ini
testing/web-platform/meta/feature-policy/reporting/unsized-media-reporting.html.ini
testing/web-platform/meta/feature-policy/reporting/vr-reporting.https.html.ini
testing/web-platform/tests/feature-policy/reporting/camera-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/document-write-reporting.html
testing/web-platform/tests/feature-policy/reporting/fullscreen-reporting.html
testing/web-platform/tests/feature-policy/reporting/geolocation-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/microphone-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/midi-reporting.html
testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/sync-xhr-reporting.html
testing/web-platform/tests/feature-policy/reporting/unsized-media-reporting.html
testing/web-platform/tests/feature-policy/reporting/usb-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/vr-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/xr-reporting.https.html
testing/web-platform/tests/feature-policy/reporting/xr-reporting.https.html.headers
--- a/testing/web-platform/meta/feature-policy/__dir__.ini
+++ b/testing/web-platform/meta/feature-policy/__dir__.ini
@@ -1,2 +1,2 @@
-prefs: [dom.security.featurePolicy.enabled:true, dom.payments.request.enabled:true]
+prefs: [dom.security.featurePolicy.enabled:true, dom.payments.request.enabled:true, dom.reporting.enabled:true, dom.reporting.featurePolicy.enabled:true, dom.webmidi.enabled:true, dom.vr.enabled:true]
 lsan-allowed: []
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/idlharness.window.js.ini
+++ /dev/null
@@ -1,37 +0,0 @@
-[idlharness.window.html]
-  [FeaturePolicyViolationReportBody interface: attribute columnNumber]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: attribute sourceFile]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface object name]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: existence and properties of interface prototype object's @@unscopables property]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface object length]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: attribute featureId]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: existence and properties of interface prototype object's "constructor" property]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: attribute lineNumber]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: existence and properties of interface prototype object]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: attribute disposition]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: existence and properties of interface object]
-    expected: FAIL
-
-  [FeaturePolicyViolationReportBody interface: attribute message]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/reporting/camera-reporting.https.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[camera-reporting.https.html]
-  expected: ERROR
-  [Camera Report Format]
-    expected: NOTRUN
-
--- a/testing/web-platform/meta/feature-policy/reporting/document-write-reporting.html.ini
+++ b/testing/web-platform/meta/feature-policy/reporting/document-write-reporting.html.ini
@@ -1,5 +1,4 @@
 [document-write-reporting.html]
-  expected: ERROR
   [Document-write Report Format]
-    expected: NOTRUN
+    expected: FAIL
 
--- a/testing/web-platform/meta/feature-policy/reporting/encrypted-media-reporting.https.html.ini
+++ b/testing/web-platform/meta/feature-policy/reporting/encrypted-media-reporting.https.html.ini
@@ -1,4 +1,5 @@
 [encrypted-media-reporting.https.html]
+  expected: TIMEOUT
   [Encrypted Media report format]
-    expected: FAIL
+    expected: TIMEOUT
 
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/reporting/fullscreen-reporting.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[fullscreen-reporting.html]
-  [Fullscreen Report Format]
-    expected: FAIL
-
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/reporting/geolocation-reporting.https.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[geolocation-reporting.https.html]
-  expected: ERROR
-  [Geolocation Report Format]
-    expected: NOTRUN
-
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/reporting/microphone-reporting.https.html.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[microphone-reporting.https.html]
-  expected: ERROR
-  [Microphone Report Format]
-    expected: NOTRUN
-
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/reporting/midi-reporting.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[midi-reporting.html]
-  [MIDI Report Format]
-    expected: FAIL
-
--- a/testing/web-platform/meta/feature-policy/reporting/payment-reporting.https.html.ini
+++ b/testing/web-platform/meta/feature-policy/reporting/payment-reporting.https.html.ini
@@ -1,5 +1,5 @@
 [payment-reporting.https.html]
-  expected: ERROR
   [PaymentRequest Report Format]
-    expected: NOTRUN
+    expected:
+      if not e10s: FAIL
 
--- a/testing/web-platform/meta/feature-policy/reporting/sync-xhr-reporting.html.ini
+++ b/testing/web-platform/meta/feature-policy/reporting/sync-xhr-reporting.html.ini
@@ -1,5 +1,4 @@
 [sync-xhr-reporting.html]
-  expected: ERROR
   [Sync-xhr Report Format]
-    expected: NOTRUN
+    expected: FAIL
 
--- a/testing/web-platform/meta/feature-policy/reporting/unsized-media-reporting.html.ini
+++ b/testing/web-platform/meta/feature-policy/reporting/unsized-media-reporting.html.ini
@@ -1,4 +1,5 @@
 [unsized-media-reporting.html]
+  expected: TIMEOUT
   [Unsized-media Report Format]
-    expected: FAIL
+    expected: TIMEOUT
 
deleted file mode 100644
--- a/testing/web-platform/meta/feature-policy/reporting/vr-reporting.https.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[vr-reporting.https.html]
-  [VR Report Format]
-    expected: FAIL
-
--- a/testing/web-platform/tests/feature-policy/reporting/camera-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/camera-reporting.https.html
@@ -5,26 +5,26 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("Camera Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "camera");
+  assert_equals(report.body.featureId, "camera");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 navigator.mediaDevices.getUserMedia({video: true}).then(
   t.unreached_func("UserMedia camera access should not be allowed in this document.")
 ).catch(() => {});
     </script>
   </body>
 </html>
--- a/testing/web-platform/tests/feature-policy/reporting/document-write-reporting.html
+++ b/testing/web-platform/tests/feature-policy/reporting/document-write-reporting.html
@@ -5,27 +5,27 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("Document-write Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "document-write");
+  assert_equals(report.body.featureId, "document-write");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 t.step_func(() => {
   assert_throws('NotAllowedError',
   () => document.write("This should not succeed"),
   "document.write should throw an exception when disabled");
 })();
     </script>
   </body>
--- a/testing/web-platform/tests/feature-policy/reporting/fullscreen-reporting.html
+++ b/testing/web-platform/tests/feature-policy/reporting/fullscreen-reporting.html
@@ -4,26 +4,26 @@
     <script src='/resources/testharness.js'></script>
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <div id='fs'></div>
     <script>
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "fullscreen");
+  assert_equals(report.body.featureId, "fullscreen");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 async_test(t => {
   new ReportingObserver(t.step_func_done(check_report_format),
-                        {types: ['feature-policy']}).observe();
+                        {types: ['feature-policy-violation']}).observe();
   document.getElementById('fs').requestFullscreen().then(t.unreached_func(
     "Fullscreen should not be allowed in this document.")).catch(()=>{});
 }, "Fullscreen Report Format");
     </script>
   </body>
 </html>
--- a/testing/web-platform/tests/feature-policy/reporting/geolocation-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/geolocation-reporting.https.html
@@ -5,26 +5,25 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("Geolocation Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "geolocation");
-  assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
+  assert_equals(report.body.featureId, "geolocation");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 navigator.geolocation.getCurrentPosition(
   t.unreached_func("geolocation should be disabled in this document"),
   () => {});
     </script>
   </body>
 </html>
--- a/testing/web-platform/tests/feature-policy/reporting/microphone-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/microphone-reporting.https.html
@@ -5,26 +5,26 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("Microphone Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "microphone");
+  assert_equals(report.body.featureId, "microphone");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 navigator.mediaDevices.getUserMedia({audio: true}).then(
   t.unreached_func("UserMedia microphone access should not be allowed in this document.")
 ).catch(() => {});
     </script>
   </body>
 </html>
--- a/testing/web-platform/tests/feature-policy/reporting/midi-reporting.html
+++ b/testing/web-platform/tests/feature-policy/reporting/midi-reporting.html
@@ -3,29 +3,29 @@
   <head>
     <script src='/resources/testharness.js'></script>
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "midi");
+  assert_equals(report.body.featureId, "midi");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 promise_test(async (t) => {
   const report = new Promise(resolve => {
     new ReportingObserver((reports, observer) => resolve([reports, observer]),
-                          {types: ['feature-policy']}).observe();
+                          {types: ['feature-policy-violation']}).observe();
   });
   await promise_rejects(t, 'SecurityError', navigator.requestMIDIAccess(),
                         "MIDI device access should not be allowed in this document.");
   const [reports, observer] = await report;
   check_report_format(reports, observer);
 }, "MIDI Report Format");
     </script>
   </body>
--- a/testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/payment-reporting.https.html
@@ -5,27 +5,27 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("PaymentRequest Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "payment");
+  assert_equals(report.body.featureId, "payment");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 t.step_func(() => {
   assert_throws('SecurityError',
   () => new PaymentRequest(
     [{ supportedMethods: 'basic-card' }],
     { total: { label: 'Total', amount: { currency: 'USD', value: 0 }}},
     {}).show(),
   "PaymentRequest API should not be allowed in this document.");
--- a/testing/web-platform/tests/feature-policy/reporting/sync-xhr-reporting.html
+++ b/testing/web-platform/tests/feature-policy/reporting/sync-xhr-reporting.html
@@ -5,27 +5,27 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("Sync-xhr Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "sync-xhr");
+  assert_equals(report.body.featureId, "sync-xhr");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 t.step_func(() => {
   var xhr = new XMLHttpRequest();
   xhr.open("GET", document.location.href, false);
   assert_throws('NetworkError',
     () => xhr.send(),
     "Synchronous XHR.send should throw an exception when disabled");
 })();
--- a/testing/web-platform/tests/feature-policy/reporting/unsized-media-reporting.html
+++ b/testing/web-platform/tests/feature-policy/reporting/unsized-media-reporting.html
@@ -4,21 +4,21 @@
     <script src='/resources/testharness.js'></script>
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <img src="image.jpg">
     <script>
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "unsized-media");
+  assert_equals(report.body.featureId, "unsized-media");
   assert_equals(typeof report.body.message, "string");
 };
 
 async_test(t => {
   new ReportingObserver(t.step_func_done(check_report_format),
-                        {types: ['feature-policy'], buffered: true}).observe();
+                        {types: ['feature-policy-violation'], buffered: true}).observe();
 }, "Unsized-media Report Format");
     </script>
   </body>
 </html>
--- a/testing/web-platform/tests/feature-policy/reporting/usb-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/usb-reporting.https.html
@@ -5,26 +5,26 @@
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var t = async_test("USB Report Format");
 
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "usb");
+  assert_equals(report.body.featureId, "usb");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 new ReportingObserver(t.step_func_done(check_report_format),
-                      {types: ['feature-policy']}).observe();
+                      {types: ['feature-policy-violation']}).observe();
 
 navigator.usb.getDevices().then(
   t.unreached_func("USB device access should not be allowed in this document.")
 ).catch(() => {});
     </script>
   </body>
 </html>
--- a/testing/web-platform/tests/feature-policy/reporting/vr-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/vr-reporting.https.html
@@ -3,29 +3,29 @@
   <head>
     <script src='/resources/testharness.js'></script>
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "vr");
+  assert_equals(report.body.featureId, "vr");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 promise_test(async (t) => {
   const report = new Promise(resolve => {
     new ReportingObserver((reports, observer) => resolve([reports, observer]),
-                          {types: ['feature-policy']}).observe();
+                          {types: ['feature-policy-violation']}).observe();
   });
   await promise_rejects(t, 'SecurityError', navigator.getVRDisplays(),
                         "VR device access should not be allowed in this document.");
   const [reports, observer] = await report;
   check_report_format(reports, observer);
 }, "VR Report Format");
     </script>
   </body>
--- a/testing/web-platform/tests/feature-policy/reporting/xr-reporting.https.html
+++ b/testing/web-platform/tests/feature-policy/reporting/xr-reporting.https.html
@@ -3,29 +3,29 @@
   <head>
     <script src='/resources/testharness.js'></script>
     <script src='/resources/testharnessreport.js'></script>
   </head>
   <body>
     <script>
 var check_report_format = (reports, observer) => {
   let report = reports[0];
-  assert_equals(report.type, "feature-policy");
+  assert_equals(report.type, "feature-policy-violation");
   assert_equals(report.url, document.location.href);
-  assert_equals(report.body.feature, "vr");
+  assert_equals(report.body.featureId, "vr");
   assert_equals(report.body.sourceFile, document.location.href);
-  assert_equals(typeof report.body.message, "string");
   assert_equals(typeof report.body.lineNumber, "number");
   assert_equals(typeof report.body.columnNumber, "number");
+  assert_equals(report.body.disposition, "enforce");
 };
 
 promise_test(async (t) => {
   const report = new Promise(resolve => {
     new ReportingObserver((reports, observer) => resolve([reports, observer]),
-                          {types: ['feature-policy']}).observe();
+                          {types: ['feature-policy-violation']}).observe();
   });
   await promise_rejects(t, 'SecurityError', navigator.xr.requestDevice(),
                         "XR device access should not be allowed in this document.");
   const [reports, observer] = await report;
   check_report_format(reports, observer);
 }, "XR Report Format");
     </script>
   </body>
--- a/testing/web-platform/tests/feature-policy/reporting/xr-reporting.https.html.headers
+++ b/testing/web-platform/tests/feature-policy/reporting/xr-reporting.https.html.headers
@@ -1,1 +1,1 @@
-Feature-Policy: vr 'none'
+Feature-Policy: xr 'none'