Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: LayoutTests/inspector/sources/debugger-async/async-callstack-performance-observer.html

Issue 1198863006: First version of PerformanceObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add LayoutTest Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698