Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /performance-timeline/supportedEntryTypes.any.html - WPT Dashboard Interop Dashboard
- /performance-timeline/supportedEntryTypes.any.worker.html - WPT Dashboard Interop Dashboard
test(() => {
if (typeof PerformanceObserver.supportedEntryTypes === "undefined")
assert_unreached("supportedEntryTypes is not supported.");
const types = PerformanceObserver.supportedEntryTypes;
assert_greater_than(types.length, 0,
"There should be at least one entry in supportedEntryTypes.");
for (let i = 1; i < types.length; i++) {
assert_true(types[i-1] < types[i],
"The strings '" + types[i-1] + "' and '" + types[i] +
"' are repeated or they are not in alphabetical order.")
}
}, "supportedEntryTypes exists and returns entries in alphabetical order");
test(() => {
if (typeof PerformanceObserver.supportedEntryTypes === "undefined")
assert_unreached("supportedEntryTypes is not supported.");
assert_true(PerformanceObserver.supportedEntryTypes ===
PerformanceObserver.supportedEntryTypes);
}, "supportedEntryTypes caches result");