summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/propagate-nonce-inline-module.html
blob: f3322773a42b11868bd472cb004ea5ca41f224f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
<!DOCTYPE html>
<meta http-equiv="content-security-policy" content="script-src 'nonce-correct'">
<script nonce="correct" src="/resources/testharness.js"></script>
<script nonce="correct" src="/resources/testharnessreport.js"></script>
<script type="module" nonce="correct">
promise_test(t => {
  return import("./../imports-a.js").then(module => {
    assert_true(window.evaluated_imports_a);
    assert_equals(module.A["from"], "imports-a.js");
  });
}, "Dynamically imported module should eval when imported from script w/ a valid nonce.");
</script>