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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html

Issue 1893333004: [DevTools] Bring back InspectorInstrumenetation::didHandleEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 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 | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html
new file mode 100644
index 0000000000000000000000000000000000000000..aa6afe09a5f27dc869e4636dd7ac1c443edb4e08
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener.html
@@ -0,0 +1,50 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+<script>
+
+function SHOULD_NOT_STOP_HERE()
+{
+ return 239;
+}
+
+function addEmptyEventListenerAndClick()
+{
+ // this event listener won't execute any JS code.
+ var div = document.getElementById("myDiv");
+ div.addEventListener("click", {});
+ div.click();
+ SHOULD_NOT_STOP_HERE();
+ debugger;
+}
+
+var test = function()
+{
+ InspectorTest.startDebuggerTest(step1, true);
+
+ function step1()
+ {
+ var actions = [ "Print" ];
+ InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step2);
+ WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._setBreakpoint("listener:click");
+ InspectorTest.evaluateInPageWithTimeout("addEmptyEventListenerAndClick()");
+ }
+
+ function step2()
+ {
+ WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._removeBreakpoint("listener:click");
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that scheduled pause is cleared after processing event with empty handler.
+</p>
+<div id="myDiv"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-empty-event-listener-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698