simple-verbose-debug-report.sub.https.html (1097B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <meta name=timeout content=long> 4 <script src="/common/get-host-info.sub.js"></script> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="/attribution-reporting/resources/helpers.js"></script> 8 <script> 9 attribution_reporting_promise_test(async t => { 10 const expectedTriggerDebugKey = '456'; 11 12 registerAttributionSrcByImg(createRedirectChain([ 13 { 14 trigger: { 15 debug_reporting: true, 16 debug_key: expectedTriggerDebugKey, 17 event_trigger_data: [{}], 18 }, 19 }, 20 ])); 21 22 const payload = await pollVerboseDebugReports(); 23 assert_equals(payload.reports.length, 1); 24 const report = JSON.parse(payload.reports[0].body); 25 assert_equals(report.length, 1); 26 assert_equals(report[0].type, 'trigger-no-matching-source'); 27 assert_own_property(report[0], 'body'); 28 assert_equals(report[0].body.attribution_destination, 'https://{{host}}'); 29 assert_equals(report[0].body.trigger_debug_key, expectedTriggerDebugKey); 30 }, 'Verbose debug report is received.'); 31 </script>