summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/shadow-dom/focus-navigation/reading-order/tentative/grid-order-on-shadow-host.html
blob: a48eda1b57cd26b642edeed2d890bbf01a6043fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Display: reading-order-items with value grid-order on shadow host</title>
<link rel="help" href="https://drafts.csswg.org/css-display-4/#reading-order-items">
<link rel="author" title="Di Zhang" href="mailto:dizhangg@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src='../../resources/shadow-dom.js'></script>
<script src="../../resources/focus-utils.js"></script>

<style>
.wrapper {
  display: grid;
  reading-order-items: grid-order;
}
</style>

<div class="test-case" data-expect="root/B,root/A"
      data-description="Grid items in shadow host with delegatesFocus">
  <div id="root" class="wrapper" tabindex="0">
    <template shadowrootmode="open" shadowrootdelegatesfocus>
      <button id="A" style="order: 2">A</button>
      <button id="B" style="order: 1">B</button>
    </template>
  </div>
</div>

<div class="test-case" data-expect="root2,root2/B,root2/A"
      data-description="Grid items in shadow host without delegatesFocus">
  <div id="root2" class="wrapper" tabindex="0">
    <template shadowrootmode="open">
      <button id="A" style="order: 2">A</button>
      <button id="B" style="order: 1">B</button>
    </template>
  </div>
</div>

<script>
runFocusTestCases();
</script>