| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| description("Test for performance-timeline serializers."); |
| |
| performance.mark("test"); |
| performance.measure("test"); |
| |
| function filter(key, value) { |
| if (typeof value === "number") |
| return "<filtered number>"; |
| return value; |
| } |
| |
| window.entry = null; |
| for (entry of performance.getEntriesByName("test")) { |
| testPassed(JSON.stringify(entry, filter)); |
| shouldBe(`Object.keys(JSON.parse(JSON.stringify(entry))).length`, `4`); |
| } |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |