summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/event-timing/supported-types-consistent-with-self.html
blob: b8a6876bf8000013330585373580dba3a8dffba2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<meta charset=utf-8 />
<title>Event Timing: supportedEntryTypes should be consistent with `'PerformanceEventTiming' in Self`
</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
test(() => {
  const isFirstInputSupportedInEntryTypes = PerformanceObserver.supportedEntryTypes.includes('first-input');
  const isEventSupportedInEntryTypes = PerformanceObserver.supportedEntryTypes.includes('event');

  const isEventTimingSupportedInSelf = 'PerformanceEventTiming' in self;

  assert_equals(isFirstInputSupportedInEntryTypes, isEventTimingSupportedInSelf)
  assert_equals(isEventSupportedInEntryTypes, isEventTimingSupportedInSelf)
}, "supportedEntryTypes should be consistent with `'PerformanceEventTiming' in Self`");
</script>
</html>