document-reporting-path-absolute.https.sub.html (1339B)
1 <!DOCTYPE HTML> 2 <meta charset=utf-8> 3 <title>Test that Reporting-Endpoints report received for absolute path endpoint.</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testdriver.js"></script> 7 <script src="/resources/testdriver-vendor.js"></script> 8 <script src='resources/report-helper.js'></script> 9 <p id="error">No error</p> 10 <script> 11 async_test(function (test) { 12 var observer = new ReportingObserver(function (reports) { 13 test.step(function () { 14 // Reports should be received in the same order that they were 15 // generated. 16 assert_equals(reports.length, 1); 17 assert_equals(reports[0].type, "deprecation"); 18 }); 19 test.done(); 20 }); 21 observer.observe(); 22 }, "report generated"); 23 </script> 24 <script>window.webkitCancelAnimationFrame(() => {});</script> 25 <script> 26 const base_url = `${location.protocol}//${location.host}`; 27 const endpoint = `${base_url}/reporting/resources/report.py`; 28 const id = '8106c1d6-55f7-4c82-a8e1-fabc59f890f8'; 29 promise_test(async t => { 30 await wait(3000); 31 const reports = await pollReports(endpoint, id); 32 checkReportExists(reports, 'deprecation', location.href); 33 }, "Reporting-Endpoints defined endpoint received reports."); 34 </script> 35 </body> 36 37 </html>