Blob Blame History Raw
<!doctype html>
<script>
  // Test for content redistribution outside of the document.
  // Passes if it doesn't assert.
  let host = document.createElement('div');
  host.innerHTML = "<div id='foo'></div>";

  let shadowRoot = host.createShadowRoot();
  shadowRoot.innerHTML = "<content select='#foo'></content>";

  host.firstElementChild.removeAttribute('id');

  // Move to the document, do the same.
  document.documentElement.appendChild(host);
  host.firstElementChild.setAttribute('id', 'foo');
</script>