summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/event-timing/supported-types.window.js
blob: 1cc43495c096fd0cd568fa5983055c0390f94d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
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'.");