Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit eecf621

Browse files
dcreagerfoolip
authored andcommitted
Reporting: Payload field should be body, not report
Per https://w3c.github.io/reporting/#try-delivery, the field in a JavaScript report object that contains the body is called `body`, not `report`. Bug: 704259 Change-Id: Iba3186a0104c2192ced5e4233d55e042e05908f3 Reviewed-on: https://chromium-review.googlesource.com/1140193 Reviewed-by: Misha Efimov <[email protected]> Commit-Queue: Douglas Creager <[email protected]> Cr-Commit-Position: refs/heads/master@{#575894}
1 parent b4d63df commit eecf621

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content-security-policy/support/checkReport.sub.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@
7373

7474
if(data["csp-report"] != undefined && data["csp-report"][reportField] != undefined) {
7575
assert_field_value(data["csp-report"][reportField], reportValue, reportField);
76-
} else if (data[0] != undefined && data[0]["report"] != undefined && data[0]["report"][reportField] != undefined) {
77-
assert_field_value(data[0]["report"][reportField], reportValue, reportField);
76+
} else if (data[0] != undefined && data[0]["body"] != undefined && data[0]["body"][reportField] != undefined) {
77+
assert_field_value(data[0]["body"][reportField], reportValue, reportField);
7878
} else {
7979
assert_equals("", reportField, "Expected report field could not be found in report");
8080
}

0 commit comments

Comments
 (0)