Commit fc98000e authored by Antonio Sartori's avatar Antonio Sartori Committed by Chromium LUCI CQ

CSP: Fix asserted violatedDirective in WPT CSP report

A Web Platform Test for Content Security Policy was wrongly expecting
the violated directive of a CSP report for a <script> element
violation to be 'script-src'. This change fixes that.

Bug: 694525, 651742
Change-Id: Ia499dbf49678e4d6e834c51ab472f874063badf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577683Reviewed-by: default avatarArthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Antonio Sartori <antoniosartori@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834683}
parent 1db0f5d7
...@@ -1911,7 +1911,6 @@ crbug.com/694525 external/wpt/content-security-policy/connect-src/worker-from-gu ...@@ -1911,7 +1911,6 @@ crbug.com/694525 external/wpt/content-security-policy/connect-src/worker-from-gu
crbug.com/694525 external/wpt/content-security-policy/connect-src/worker-connect-src-blocked.sub.html [ Skip ] crbug.com/694525 external/wpt/content-security-policy/connect-src/worker-connect-src-blocked.sub.html [ Skip ]
crbug.com/694525 external/wpt/content-security-policy/navigation/to-javascript-parent-initiated-child-csp.html [ Skip ] crbug.com/694525 external/wpt/content-security-policy/navigation/to-javascript-parent-initiated-child-csp.html [ Skip ]
crbug.com/694525 external/wpt/content-security-policy/form-action/form-action-src-redirect-blocked.sub.html [ Skip ] crbug.com/694525 external/wpt/content-security-policy/form-action/form-action-src-redirect-blocked.sub.html [ Skip ]
crbug.com/694525 external/wpt/content-security-policy/script-src/script-src-1_10.html [ Skip ]
crbug.com/694525 external/wpt/content-security-policy/script-src/script-src-strict_dynamic_in_img-src.html [ Skip ] crbug.com/694525 external/wpt/content-security-policy/script-src/script-src-strict_dynamic_in_img-src.html [ Skip ]
crbug.com/694525 external/wpt/content-security-policy/script-src/worker-importscripts-blocked.sub.html [ Skip ] crbug.com/694525 external/wpt/content-security-policy/script-src/worker-importscripts-blocked.sub.html [ Skip ]
crbug.com/694525 external/wpt/content-security-policy/script-src/worker-set-timeout-blocked.sub.html [ Skip ] crbug.com/694525 external/wpt/content-security-policy/script-src/worker-set-timeout-blocked.sub.html [ Skip ]
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
var t_spv = async_test("Test that securitypolicyviolation event is fired"); var t_spv = async_test("Test that securitypolicyviolation event is fired");
window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) { window.addEventListener("securitypolicyviolation", t_spv.step_func_done(function(e) {
assert_equals(e.violatedDirective, "script-src"); assert_equals(e.violatedDirective, "script-src-elem");
})); }));
</script> </script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment