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

Unified Diff: LayoutTests/inspector/sources/debugger/async-callstack-scripted-scroll.html

Issue 332493002: DevTools: Support async call stacks for scripted animation events (like scroll). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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-callstack-scripted-scroll.html
diff --git a/LayoutTests/inspector/sources/debugger/async-callstack-scripted-scroll.html b/LayoutTests/inspector/sources/debugger/async-callstack-scripted-scroll.html
new file mode 100644
index 0000000000000000000000000000000000000000..e011c61fb0cbe22ddd8fb7a42d688f39d264736d
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/async-callstack-scripted-scroll.html
@@ -0,0 +1,56 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function testFunction()
+{
+ setTimeout(timeout, 0);
+}
+
+function timeout()
+{
+ var outer = document.getElementById("outer");
+ outer.scrollTop = 0;
+ outer.addEventListener("scroll", onScroll1, false);
+ outer.addEventListener("scroll", onScroll2, false);
+ outer.scrollTop = 40;
+ outer.scrollTop = 60;
+}
+
+function onScroll1()
+{
+ var outer = document.getElementById("outer");
+ outer.removeEventListener("scroll", onScroll1, false);
+ debugger;
+}
+
+function onScroll2()
+{
+ var outer = document.getElementById("outer");
+ outer.removeEventListener("scroll", onScroll2, false);
+ debugger;
+}
+
+var test = function()
+{
+ var totalDebuggerStatements = 2;
+ var maxAsyncCallStackDepth = 4;
+ InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests asynchronous call stacks for scripted scroll events.
+</p>
+
+<div id="outer" style="width: 100px; height: 100px; overflow:auto">
+ <div id="inner" style="width: 200px; height: 200px;"></div>
+</div>
+
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698