diff --git a/dom/performance/PerformanceObserverEntryList.cpp b/dom/performance/PerformanceObserverEntryList.cpp index d5070ddcaf03..20e818f3d765 100644 --- a/dom/performance/PerformanceObserverEntryList.cpp +++ b/dom/performance/PerformanceObserverEntryList.cpp @@ -90,10 +90,18 @@ PerformanceObserverEntryList::GetEntriesByName( nsTArray>& aRetval) { aRetval.Clear(); + const bool typePassed = aEntryType.WasPassed(); for (const RefPtr& entry : mEntries) { - if (entry->GetName().Equals(aName)) { - aRetval.AppendElement(entry); + if (!entry->GetName().Equals(aName)) { + continue; } + + if (typePassed && + !entry->GetEntryType().Equals(aEntryType.Value())) { + continue; + } + + aRetval.AppendElement(entry); } aRetval.Sort(PerformanceEntryComparator()); } diff --git a/testing/web-platform/meta/performance-timeline/po-getentries.any.js.ini b/testing/web-platform/meta/performance-timeline/po-getentries.any.js.ini deleted file mode 100644 index 33bb08b0403c..000000000000 --- a/testing/web-platform/meta/performance-timeline/po-getentries.any.js.ini +++ /dev/null @@ -1,11 +0,0 @@ -[po-getentries.any.html] - type: testharness - [getEntries, getEntriesByType and getEntriesByName work] - expected: FAIL - - -[po-getentries.any.worker.html] - type: testharness - [getEntries, getEntriesByType and getEntriesByName work] - expected: FAIL -