Skip to content

Commit

Permalink
Server Timing: add toJSON() to IDL and WPT
Browse files Browse the repository at this point in the history
Bug: 702760
Change-Id: I5d33dd2584d3d109fa5a850611124418dc34b15b
Reviewed-on: https://chromium-review.googlesource.com/635906
Commit-Queue: Yoav Weiss <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Cr-Commit-Position: refs/heads/master@{#497525}
  • Loading branch information
Charles Vazac authored and chromium-wpt-export-bot committed Aug 25, 2017
1 parent 2352285 commit 65602b4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/performance-timeline-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ function test_equals(value, equals, msg, properties)
function test_entries(actualEntries, expectedEntries) {
test_equals(actualEntries.length, expectedEntries.length)
expectedEntries.forEach(function (expectedEntry) {
test_true(!!actualEntries.find(function (actualEntry) {
var foundEntry = actualEntries.find(function (actualEntry) {
return typeof Object.keys(expectedEntry).find(function (key) {
return actualEntry[key] !== expectedEntry[key]
}) === 'undefined'
}))
})
test_true(!!foundEntry)
assert_object_equals(foundEntry.toJSON(), expectedEntry)
})
}

0 comments on commit 65602b4

Please sign in to comment.