https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 948619e9aa2e43a6ca81d3bfc78669a721207523 authored by Philip Jägenstedt on 12 November 2018, 21:22:18 UTC
Find manifest for download by tags instead of commits
Tip revision: 948619e
Document-write.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/helper.sub.js"></script>
<body>
<script>
  // TrustedHTML assignments do not throw.
  test(t => {
    let p = createHTML_policy(window, 1);
    let html = p.createHTML(INPUTS.HTML);
    document.write(html);
    assert_true(document.body.innerText.indexOf(RESULTS.HTML) !== -1);
  }, "document.write with html assigned via policy (successful transformation).");
</script>
back to top