summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/event-timing/supported-types.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/event-timing/supported-types.window.js')
-rw-r--r--testing/web-platform/tests/event-timing/supported-types.window.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/web-platform/tests/event-timing/supported-types.window.js b/testing/web-platform/tests/event-timing/supported-types.window.js
new file mode 100644
index 0000000000..1cc43495c0
--- /dev/null
+++ b/testing/web-platform/tests/event-timing/supported-types.window.js
@@ -0,0 +1,12 @@
+test(() => {
+ assert_implements(window.PerformanceEventTiming, 'Event Timing is not supported.');
+ assert_implements(typeof PerformanceObserver.supportedEntryTypes !== "undefined",
+ 'supportedEntryTypes is not supported');
+ const types = PerformanceObserver.supportedEntryTypes;
+ assert_true(types.includes("first-input"),
+ "There should be 'first-input' in PerformanceObserver.supportedEntryTypes");
+ assert_true(types.includes("event"),
+ "There should be 'event' in PerformanceObserver.supportedEntryTypes");
+ assert_greater_than(types.indexOf("first-input"), types.indexOf('event'),
+ "The 'first-input' entry should appear after the 'event' entry");
+}, "supportedEntryTypes contains 'event' and 'first-input'.");