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

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

Issue 333333002: DevTools: Instrument DOMWindowEventQueue for async stacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 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
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/async-callstack-events-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/sources/debugger/async-callstack-events.html
diff --git a/LayoutTests/inspector/sources/debugger/async-callstack-events.html b/LayoutTests/inspector/sources/debugger/async-callstack-events.html
new file mode 100644
index 0000000000000000000000000000000000000000..261ec0538bd7ab1d8eb098facc318a34b1820656
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/async-callstack-events.html
@@ -0,0 +1,69 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function testFunction()
+{
+ for (var name in window) {
+ if (/^doTest[A-Z]/.test(name) && typeof window[name] === "function")
+ window[name]();
+ }
+}
+
+function setSelection(start, end)
+{
+ var node = document.getElementById("content").firstChild;
+ var range = document.createRange();
+ range.setStart(node, start);
+ range.setEnd(node, end);
+ var selection = window.getSelection();
+ selection.removeAllRanges();
+ if (start !== end)
+ selection.addRange(range);
+}
+
+function doTestSelectionChange()
+{
+ setSelection(0, 0);
+ document.addEventListener("selectionchange", onSelectionChange, false);
+ setSelection(0, 4);
+ setSelection(0, 8);
+ setSelection(0, 0);
+}
+
+function onSelectionChange()
+{
+ document.removeEventListener("selectionchange", onSelectionChange, false);
+ debugger;
+}
+
+function doTestHashChange()
+{
+ window.addEventListener("hashchange", onHashChange, false);
+ location.hash = location.hash + "x";
+}
+
+function onHashChange()
+{
+ window.removeEventListener("hashchange", onHashChange, false);
+ debugger;
+}
+
+var test = function()
+{
+ var totalDebuggerStatements = 2;
+ var maxAsyncCallStackDepth = 4;
+ InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p id="content">
+Tests asynchronous call stacks for various DOM events.
+</p>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/async-callstack-events-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698