[UserTimingL3] Refactor entry list comparison logic in custom-user-timing/
In the original comparison logic of performance entries, entries are identified based on entryType, name, detail (if listed) and startTime (if listed). An entry is set to be found only when all of the attributes match. If any of the attribute is not found, the test would just said the entry is not found. But the developer wouldn't know which attribute cause the comparison to fail. In a new logic, we use the name as the identifier for entries. Once the entry is found, we then compare their attributes. In this way, developers would know which attribute caused the failure by the error message. Another benefit of the refactoring is that it factors out the logic of single entry comparison. The logic will be useful for test cases in later patches. Bug: 758385 Change-Id: Ib5721367228f32567efa74cd14a75688fbb34af7 Reviewed-on: https://chromium-review.googlesource.com/c/1346913 Commit-Queue: Liquan (Max) Gǔ <maxlg@chromium.org> Reviewed-by:Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#610314}
Showing
Please register or sign in to comment