summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/content-security-policy/script-src/eval-allowed-in-report-only-mode.html
blob: eebc8f026f9f1b7387614c86f4d5d2af8ab29ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html>
<head>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <!-- Content-Security-Policy-Report-Only: script-src 'unsafe-inline' -->
</head>
<body>
  <script>
    var t = async_test("Eval is allowed because the CSP is report-only");
    try {
      eval("t.done()");
    } catch {
      t.step(function() { assert_true(false, "The eval should have execute succesfully"); })
    }
  </script>
</body>
</html>