<!DOCTYPE html>
<html>
<body>
<meta name="author" href="mailto:dizhangg@chromium.org">
<meta name="assert" content="Selection isCollapsed in shadow tree">
<link rel="help" href="https://w3c.github.io/selection-api/#dom-selection-iscollapsed">
<link rel="help" href="https://issues.chromium.org/issues/40400558">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<div id="container">
  <div id="host">
    <template shadowrootmode=open>
      <p id="inText