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

Unified Diff: LayoutTests/inspector/sources/debugger/event-listener-breakpoints-after-suspension.html

Issue 1089463005: Devtools: Fix "EventListeners don't work after timeline" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test added Created 5 years, 8 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/event-listener-breakpoints-after-suspension-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/sources/debugger/event-listener-breakpoints-after-suspension.html
diff --git a/LayoutTests/inspector/sources/debugger/event-listener-breakpoints-after-suspension.html b/LayoutTests/inspector/sources/debugger/event-listener-breakpoints-after-suspension.html
new file mode 100644
index 0000000000000000000000000000000000000000..a0d502c62ef8be14cc4fec519a876d918309fd83
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/event-listener-breakpoints-after-suspension.html
@@ -0,0 +1,78 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function testElementClicked()
+{
+ return 0;
+}
+
+function addListenerAndClick()
+{
+ var element = document.getElementById("test");
+ element.addEventListener("click", testElementClicked, true);
+ element.click();
+}
+
+function test()
+{
+ InspectorTest.startDebuggerTest(start);
+
+ function start()
+ {
+ var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints;
+ pane._setBreakpoint("listener:click");
+ InspectorTest.waitUntilPaused(paused);
+ InspectorTest.evaluateInPageWithTimeout("addListenerAndClick()");
+ }
+
+ function paused(callFrames, reason, breakpointIds, asyncStackTrace, auxData)
+ {
+ printEventTargetName(auxData);
+ InspectorTest.resumeExecution(suspendAll);
+ }
+
+ function suspendAll()
+ {
+ InspectorTest.addResult("Suspend all targets");
+ WebInspector.targetManager.suspendAllTargets();
+ InspectorTest.runAfterPendingDispatches(resumeAll);
+ }
+
+ function resumeAll()
+ {
+ InspectorTest.addResult("Resume all targets");
+ WebInspector.targetManager.resumeAllTargets();
+ InspectorTest.waitUntilPaused(finish);
+ InspectorTest.evaluateInPageWithTimeout("addListenerAndClick()");
+ }
+
+ function finish()
+ {
+ InspectorTest.addResult("Successfully paused after suspension and resuming all targets");
+ InspectorTest.completeDebuggerTest();
+ }
+
+ function printEventTargetName(auxData)
+ {
+ var targetName = auxData && auxData.targetName;
+ if (targetName)
+ InspectorTest.addResult("Event target: " + targetName);
+ else
+ InspectorTest.addResult("FAIL: No event target name received!");
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests event listener breakpoints.
+</p>
+
+<input type=button id="test"></input>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/sources/debugger/event-listener-breakpoints-after-suspension-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698