OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
5 <script> | |
6 | |
7 var observer = new PerformanceObserver(performanceCallback); | |
8 | |
9 function performanceCallback(performanceEntryList) | |
10 { | |
11 debugger; | |
12 } | |
13 | |
14 function testFunction() | |
15 { | |
16 setTimeout(timeout1, 0); | |
17 var config = { entryTypes: ['mark', 'measure']}; | |
18 observer.observe(config); | |
19 } | |
20 | |
21 function timeout1() | |
22 { | |
23 setTimeout(timeout2, 0); | |
24 window.performance.mark('mark_1'); | |
25 } | |
26 | |
27 function timeout2() | |
28 { | |
29 setTimeout(timeout3, 0); | |
30 window.performance.mark('mark_2'); | |
31 } | |
32 | |
33 function timeout3() | |
yurys
2015/08/26 19:17:05
what's the value for the user of async call stacks
MikeB
2015/08/27 18:02:49
Done.
| |
34 { | |
35 window.performance.measure('measure_1', 'mark_1', 'mark_2'); | |
36 } | |
37 | |
38 var test = function() | |
39 { | |
40 var totalDebuggerStatements = 3; | |
41 var maxAsyncCallStackDepth = 5; | |
42 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt ackDepth); | |
43 } | |
44 | |
45 </script> | |
46 </head> | |
47 | |
48 <body onload="runTest()"> | |
49 <p> | |
50 Tests asynchronous call stacks for PerformanceObserver. | |
51 </p> | |
52 </body> | |
53 </html> | |
OLD | NEW |