This tests the effect of a valid script-nonce value. It passes if a CSP violation is generated, and the two PASS alerts are executed.

Summary

Harness status: OK

Found 1 tests

Details

ResultTest NameMessage
PassExpecting alerts: ["PASS (closely-quoted nonce)","PASS (nonce w/whitespace)", "violated-directive=script-src-elem", "violated-directive=script-src-elem", "violated-directive=script-src-elem"]
Asserts run
Pass
assert_equals("PASS (closely-quoted nonce)", "PASS (closely-quoted nonce)")
    at Test.<anonymous> ( /content-security-policy/support/alertAssert.sub.js?alerts=[%22PASS%20(closely-quoted%20nonce)%22,%22PASS%20(nonce%20w/whitespace)%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22]:31:18)
Pass
assert_equals("PASS (nonce w/whitespace)", "PASS (nonce w/whitespace)")
    at Test.<anonymous> ( /content-security-policy/support/alertAssert.sub.js?alerts=[%22PASS%20(closely-quoted%20nonce)%22,%22PASS%20(nonce%20w/whitespace)%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22]:31:18)
Pass
assert_equals("violated-directive=script-src-elem", "violated-directive=script-src-elem")
    at Test.<anonymous> ( /content-security-policy/support/alertAssert.sub.js?alerts=[%22PASS%20(closely-quoted%20nonce)%22,%22PASS%20(nonce%20w/whitespace)%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22]:31:18)
Pass
assert_equals("violated-directive=script-src-elem", "violated-directive=script-src-elem")
    at Test.<anonymous> ( /content-security-policy/support/alertAssert.sub.js?alerts=[%22PASS%20(closely-quoted%20nonce)%22,%22PASS%20(nonce%20w/whitespace)%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22]:31:18)
Pass
assert_equals("violated-directive=script-src-elem", "violated-directive=script-src-elem")
    at Test.<anonymous> ( /content-security-policy/support/alertAssert.sub.js?alerts=[%22PASS%20(closely-quoted%20nonce)%22,%22PASS%20(nonce%20w/whitespace)%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22,%20%22violated-directive=script-src-elem%22]:31:18)