summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/layout-instability/supported-layout-type.html
blob: 3ba209f50a427965b651c92701a62f9006b8a2b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!DOCTYPE html>
<head>
<title>PerformanceObserver.supportedEntryTypes contains "layout-shift"</title>
</head>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
  assert_implements(window.LayoutShift, 'Layout Instability is not supported.');
  assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined",
      'supportedEntryTypes is not supported.');
  assert_greater_than(PerformanceObserver.supportedEntryTypes.indexOf("layout-shift"), -1,
    "There should be an entry 'layout-shift' in PerformanceObserver.supportedEntryTypes");
}, "supportedEntryTypes contains 'layoutShift'.");
</script>
</body>
</html>