DOMException should not have its own toString()
[WebKit-https.git] / LayoutTests / performance-api / performance-timeline-serializers.html
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Test for performance-timeline serializers.");
9
10 performance.mark("test");
11 performance.measure("test");
12
13 function filter(key, value) {
14     if (typeof value === "number")
15         return "<filtered number>";
16     return value;
17 }
18
19 window.entry = null;
20 for (entry of performance.getEntriesByName("test")) {
21     testPassed(JSON.stringify(entry, filter));
22     shouldBe(`Object.keys(JSON.parse(JSON.stringify(entry))).length`, `4`);
23 }
24 </script>
25 <script src="../resources/js-test-post.js"></script>
26 </body>
27 </html>