"/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="../../resources/focusgroup-utils.js"></script>

<div id=root focusgroup>
  <div id=item1 tabindex=0 focusgroup="extend horizontal">
    <span id=item2 tabindex=-1>item2</span>
  </div>
  <span id=item3 tabindex=-1>item3</span>
</div>

<script>

  promise_test(async t => {
    var item1 = document.getElementById("item1");
    var item3 = document.getElementById("item3");

    await focusAndKeyPre