blob: 9ae14b8f78b9bdb965338f6f6e0d66c87d041fb9 [file] [log] [blame]
<!DOCTYPE html>
<script src="/w3c/resources/testharness.js"></script>
<script src="/w3c/resources/testharnessreport.js"></script>
<script>
test(function() {
window.performance.mark('mark1');
window.performance.mark('mark2');
window.performance.measure('measure1', 'mark1', 'mark2');
var entries = window.performance.getEntries();
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
var serialized = JSON.parse(JSON.stringify(entry));
for (var attr in entry) {
if (typeof entry[attr] != 'function') {
assert_equals(serialized[attr], entry[attr], entry.constructor.name + '.' + attr);
}
}
}
}, 'PerformanceEntry subclasses should serialize all attributes');
</script>