https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 7cb0d28a36927eb21b7984a80c6629969634a1e2 authored by moz-wptsync-bot on 13 March 2018, 19:13:50 UTC
Performance.measure(name) should not throw if name is one of the readonly attribute of the Performance interface,
Tip revision: 7cb0d28
outerHTML.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<body>
<div id="container"></div>
<script>
  var container = document.querySelector('#container')
  test(t => {
    var html = TrustedHTML.escape(STRINGS.unescapedHTML);

    var d = document.createElement('div');
    document.querySelector('#container').appendChild(d);
    d.outerHTML = html;
    assert_equals(container.innerText, STRINGS.unescapedHTML);
    while (container.firstChild)
      container.firstChild.remove();
  }, "outerHTML = TrustedHTML.escape().");

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

    var d = document.createElement('div');
    container.appendChild(d);
    d.outerHTML = html;
    assert_equals(container.innerText, STRINGS.unescapedText);
    while (container.firstChild)
      container.firstChild.remove();
  }, "outerHTML = TrustedHTML.unsafelyCreate().");
</script>
back to top