Revision 6571e31adb61b5c42f8dcf612e467958c9561650 authored by Ben Kelly on 11 April 2018, 09:35:46 UTC, committed by moz-wptsync-bot on 11 April 2018, 14:50:18 UTC
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1451124
gecko-commit: aed7d4d9be32f8806138d2a23f4b8b0332498085
gecko-integration-branch: central
gecko-reviewers: asuth
1 parent 6e61ed2
Raw File
TrustedHTML.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<script>
  test(t => {
    var html = TrustedHTML.escape(STRINGS.unescapedHTML);

    assert_equals(html.toString(), STRINGS.escapedHTML);
  }, "Basic escaping.");

  test(t => {
    var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);

    assert_equals(html.toString(), STRINGS.unescapedHTML);
  }, "Basic unsafe construction.");
</script>
back to top