| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="/w3c/resources/testharness.js"></script> |
| 3 <script src="/w3c/resources/testharnessreport.js"></script> |
| 4 <script> |
| 5 |
| 6 test(function() { |
| 7 window.performance.mark('mark1'); |
| 8 window.performance.mark('mark2'); |
| 9 window.performance.measure('measure1', 'mark1', 'mark2'); |
| 10 |
| 11 var entries = window.performance.getEntries(); |
| 12 for (var i = 0; i < entries.length; i++) { |
| 13 var entry = entries[i]; |
| 14 var serialized = JSON.parse(JSON.stringify(entry)); |
| 15 for (var attr in entry) { |
| 16 if (typeof entry[attr] != 'function') { |
| 17 assert_equals(serialized[attr], entry[attr], entry.constructor.n
ame + '.' + attr); |
| 18 } |
| 19 } |
| 20 } |
| 21 }, 'PerformanceEntry subclasses should serialize all attributes'); |
| 22 |
| 23 </script> |
| OLD | NEW |