| 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>
|
|
|