https://github.com/web-platform-tests/wpt
Raw File
Tip revision: aa5f597d05c9429f4513b490b03f13e8b2e10742 authored by Stephen Chenney on 12 December 2018, 20:34:28 UTC
Snap the snapped_dest_rect for backgrounds
Tip revision: aa5f597
block-string-assignment-to-Element-setAttributeNS.tentative.html
<!DOCTYPE html>
<html>
<head>
  <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 *">
</head>
<body>
<script>
    test(t => {
      assert_element_accepts_trusted_html_set_ns(window, '0', t, 'a', 'b', RESULTS.HTML);
    }, "Element.setAttributeNS assigned via policy (successful HTML transformation)");

    test(t => {
      assert_element_accepts_trusted_script_set_ns(window, '1', t, 'a', 'b', RESULTS.SCRIPT);
    }, "Element.setAttributeNS assigned via policy (successful Script transformation)");

    test(t => {
      assert_element_accepts_trusted_script_url_set_ns(window, '2', t, 'a', 'b', RESULTS.SCRIPTURL);
    }, "Element.setAttributeNS assigned via policy (successful ScriptURL transformation)");

    test(t => {
      assert_element_accepts_trusted_url_set_ns(window, '3', t, 'a', 'b', RESULTS.URL);
    }, "Element.setAttributeNS assigned via policy (successful URL transformation)");

    test(t => {
      assert_throws_no_trusted_type_set_ns('a', 'b', 'A string');
    }, "`Element.setAttributeNS = string` throws");

    test(t => {
      assert_throws_no_trusted_type_set_ns('a', 'b', null);
    }, "`Element.setAttributeNS = null` throws");
</script>
back to top