https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e940b3ad8382b2a2d7f0faeb0385ed53eb15283b authored by Frédéric Wang on 11 September 2018, 08:14:16 UTC
Use document.scrollingElement to access scroll properties of the viewport
Tip revision: e940b3a
report-uri-from-inline-javascript.html
<!DOCTYPE html>
<html>
<head>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <title>Violation report is sent from inline javascript.</title>
    <!-- CSP headers
         Content-Security-Policy: img-src 'none'; report-uri ../support/report.py?op=put&reportID={{$id}}
         -->
</head>
<body>
    <script>
        // This script block will trigger a violation report.
        var i = document.createElement('img');
        i.src = '/security/resources/abe.png';
        document.body.appendChild(i);
    </script>
    <script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=img-src%20%27none%27'></script>
</body>
</html>
back to top