https://github.com/web-platform-tests/wpt
Raw File
Tip revision: e7517084404fca126c4f89eb69217206689adf17 authored by jgraham on 20 December 2018, 17:24:15 UTC
Update range-percent-intrinsic-size-1.html
Tip revision: e751708
TrustedTypePolicy-CSP-no-name.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js" ></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>

<meta http-equiv="Content-Security-Policy" content="trusted-types">
<body>
<script>
  // No name given test
  test(t => {
    assert_throws(new TypeError(),
      () => window.TrustedTypes.createPolicy('SomeName', { createHTML: s => s } ),
      "createPolicy with an empty trusted-types CSP directive");
  }, "No name list given - policy creation fails.");
</script>

back to top