diff options
Diffstat (limited to 'testing/web-platform/tests/event-timing/supported-types-consistent-with-self.html')
-rw-r--r-- | testing/web-platform/tests/event-timing/supported-types-consistent-with-self.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/web-platform/tests/event-timing/supported-types-consistent-with-self.html b/testing/web-platform/tests/event-timing/supported-types-consistent-with-self.html new file mode 100644 index 0000000000..b8a6876bf8 --- /dev/null +++ b/testing/web-platform/tests/event-timing/supported-types-consistent-with-self.html @@ -0,0 +1,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> |