Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html |
| diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3f2e80b7971479e0ef485e18486fccd3ea3ccdc |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/break-on-set-timeout-with-syntax-error.html |
| @@ -0,0 +1,52 @@ |
| +<html> |
| +<head> |
| +<script src="../../../http/tests/inspector/inspector-test.js"></script> |
| +<script src="../../../http/tests/inspector/debugger-test.js"></script> |
| +<script src="../../../http/tests/inspector/console-test.js"></script> |
| +<script> |
| + |
| +function runSetTimeoutWithSyntaxError() |
| +{ |
| + setTimeout({}, 0); |
| + setTimeout(executeSomeCode, 100); |
| +} |
| + |
| +function executeSomeCode() |
| +{ |
| + debugger; // should stop here not earlier |
| +} |
| + |
| +var test = function() |
| +{ |
| + InspectorTest.startDebuggerTest(step1, true); |
| + |
| + function step1() |
| + { |
| + WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._setBreakpoint("instrumentation:timerFired"); |
| + InspectorTest.evaluateInPage("runSetTimeoutWithSyntaxError()", InspectorTest.waitUntilMessageReceived.bind(this, step2)); |
| + } |
| + |
| + function step2() |
| + { |
| + var actions = [ "Print" ]; |
| + InspectorTest.waitUntilPausedAndPerformSteppingActions(actions, step3); |
| + InspectorTest.evaluateInPage("executeSomeCode()"); |
|
dgozman
2016/04/15 16:40:01
I don't get how this test works.
kozy
2016/04/15 17:11:47
Done.
|
| + } |
| + |
| + function step3() |
| + { |
| + WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints._removeBreakpoint("instrumentation:timerFired"); |
| + 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> |