Index: LayoutTests/inspector/sources/debugger-async/async-callstack-performance-observer.html |
diff --git a/LayoutTests/inspector/sources/debugger-async/async-callstack-performance-observer.html b/LayoutTests/inspector/sources/debugger-async/async-callstack-performance-observer.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4dcd9c6f0c5def7689111621cb1b2c01a237bee4 |
--- /dev/null |
+++ b/LayoutTests/inspector/sources/debugger-async/async-callstack-performance-observer.html |
@@ -0,0 +1,53 @@ |
+<html> |
+<head> |
+<script src="../../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../../http/tests/inspector/debugger-test.js"></script> |
+<script> |
+ |
+var observer = new PerformanceObserver(performanceCallback); |
+ |
+function performanceCallback(performanceEntryList) |
+{ |
+ debugger; |
+} |
+ |
+function testFunction() |
+{ |
+ setTimeout(timeout1, 0); |
+ var config = { entryTypes: ['mark', 'measure']}; |
+ observer.observe(config); |
+} |
+ |
+function timeout1() |
+{ |
+ setTimeout(timeout2, 0); |
+ window.performance.mark('mark_1'); |
+} |
+ |
+function timeout2() |
+{ |
+ setTimeout(timeout3, 0); |
+ window.performance.mark('mark_2'); |
+} |
+ |
+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.
|
+{ |
+ window.performance.measure('measure_1', 'mark_1', 'mark_2'); |
+} |
+ |
+var test = function() |
+{ |
+ var totalDebuggerStatements = 3; |
+ var maxAsyncCallStackDepth = 5; |
+ InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth); |
+} |
+ |
+</script> |
+</head> |
+ |
+<body onload="runTest()"> |
+<p> |
+Tests asynchronous call stacks for PerformanceObserver. |
+</p> |
+</body> |
+</html> |