haikuwebkit/LayoutTests/inspector/debugger/setBreakpoint-autoContinue....

64 lines
3.1 KiB
HTML
Raw Permalink Normal View History

Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
<html>
<head>
Web Inspector: move http/tests/inspector-protocol/ contents to http/tests/inspector/ https://bugs.webkit.org/show_bug.cgi?id=147739 Patch by Brian Burg <bburg@apple.com> on 2015-08-06 Reviewed by Timothy Hatcher. Start merging inspector-protocol/ directory into inspector/, starting with http tests. This patch puts the few http tests into their own domain directories. Files related to the test harness have been moved to the appropriate resources/ directory. Update all inspector tests to the new paths. Lastly, rename InspectorTest.js and protocol-test.html to ProtocolTestStub, to make it obvious that these files are only used by the protocol test harness. * http/tests/inspector/console/access-inspected-object-expected.txt: Renamed from LayoutTests/http/tests/inspector-protocol/access-inspected-object-expected.txt. * http/tests/inspector/console/access-inspected-object.html: Renamed from LayoutTests/http/tests/inspector-protocol/access-inspected-object.html. * http/tests/inspector/css/bad-mime-type.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: Renamed from LayoutTests/http/tests/inspector-protocol/resources/InspectorDOMListener.js. * http/tests/inspector/page/loading-iframe-document-node-expected.txt: Renamed from LayoutTests/http/tests/inspector-protocol/loading-iframe-document-node-expected.txt. * http/tests/inspector/page/loading-iframe-document-node.html: Renamed from LayoutTests/http/tests/inspector-protocol/loading-iframe-document-node.html. * http/tests/inspector/page/resources/slow-test-page.html: Renamed from LayoutTests/http/tests/inspector-protocol/resources/slow-test-page.html. * http/tests/inspector/page/resources/test-page.html: Renamed from LayoutTests/http/tests/inspector-protocol/resources/test-page.html. * http/tests/inspector/replay/document-last-modified-fallback-value.html: * http/tests/inspector/resources/ProtocolTestStub.html: Renamed from LayoutTests/http/tests/inspector-protocol/resources/protocol-test.html. * http/tests/inspector/resources/ProtocolTestStub.js: Renamed from LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js. * http/tests/inspector/resources/inspector-test.js: Renamed from LayoutTests/http/tests/inspector/inspector-test.js. * http/tests/inspector/resources/protocol-test.js: Renamed from LayoutTests/http/tests/inspector-protocol/resources/protocol-test.js. * inspector-protocol/async-test-suite.html: * inspector-protocol/console/console-message.html: * inspector-protocol/console/css-source-locations.html: Fix references to console helpers. * inspector-protocol/console/js-source-locations.html: * inspector-protocol/console/x-frame-options-message.html: * inspector-protocol/css/getSupportedCSSProperties.html: * inspector-protocol/debugger/breakpoint-action-detach.html: * inspector-protocol/debugger/breakpoint-action-with-exception.html: * inspector-protocol/debugger/breakpoint-condition-detach.html: * inspector-protocol/debugger/breakpoint-condition-with-bad-script.html: * inspector-protocol/debugger/breakpoint-condition-with-exception.html: * inspector-protocol/debugger/breakpoint-eval-with-exception.html: * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html: * inspector-protocol/debugger/call-frame-function-name.html: * inspector-protocol/debugger/call-frame-this-host.html: * inspector-protocol/debugger/call-frame-this-nonstrict.html: * inspector-protocol/debugger/call-frame-this-strict.html: * inspector-protocol/debugger/debugger-statement.html: * inspector-protocol/debugger/didSampleProbe-multiple-probes.html: * inspector-protocol/debugger/hit-breakpoint-from-console.html: * inspector-protocol/debugger/nested-inspectors.html: * inspector-protocol/debugger/pause-dedicated-worker.html: * inspector-protocol/debugger/pause-on-assert.html: * inspector-protocol/debugger/regress-133182.html: * inspector-protocol/debugger/removeBreakpoint.html: * inspector-protocol/debugger/searchInContent-linebreaks.html: * inspector-protocol/debugger/setBreakpoint-actions.html: * inspector-protocol/debugger/setBreakpoint-autoContinue.html: * inspector-protocol/debugger/setBreakpoint-column.html: * inspector-protocol/debugger/setBreakpoint-condition.html: * inspector-protocol/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector-protocol/debugger/setBreakpoint-dfg.html: * inspector-protocol/debugger/setBreakpoint-options-exception.html: * inspector-protocol/debugger/setBreakpoint.html: * inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html: * inspector-protocol/debugger/setPauseOnExceptions-all.html: * inspector-protocol/debugger/setPauseOnExceptions-none.html: * inspector-protocol/debugger/setPauseOnExceptions-uncaught.html: * inspector-protocol/debugger/setVariableValue.html: * inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html: * inspector-protocol/dom-debugger/node-removed.html: * inspector-protocol/dom/dom-remove-events.html: * inspector-protocol/dom/dom-search-crash.html: * inspector-protocol/dom/dom-search-with-context.html: * inspector-protocol/dom/dom-search.html: * inspector-protocol/dom/focus.html: * inspector-protocol/dom/getAccessibilityPropertiesForNode.html: * inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector-protocol/dom/highlight-flow-with-no-region.html: * inspector-protocol/dom/remove-multiple-nodes.html: * inspector-protocol/dom/request-child-nodes-depth.html: * inspector-protocol/layers/layers-anonymous.html: * inspector-protocol/layers/layers-blending-compositing-reasons.html: * inspector-protocol/layers/layers-compositing-reasons.html: * inspector-protocol/layers/layers-for-node.html: * inspector-protocol/layers/layers-generated-content.html: * inspector-protocol/layers/layers-reflected-content.html: * inspector-protocol/page/archive.html: * inspector-protocol/page/frameScheduledNavigation.html: * inspector-protocol/page/frameStartedLoading.html: * inspector-protocol/page/javascriptDialogEvents.html: * inspector-protocol/page/setEmulatedMedia.html: * inspector-protocol/runtime/getProperties.html: * inspector-protocol/sync-test-suite.html: * inspector/console/command-line-api.html: * inspector/console/console-api.html: * inspector/console/console-table.html: * inspector/css/get-system-fonts.html: * inspector/css/matched-style-properties.html: * inspector/css/modify-rule-selector.html: * inspector/css/pseudo-element-matches-for-pseudo-element-node.html: * inspector/css/pseudo-element-matches.html: * inspector/css/selector-dynamic-specificity.html: * inspector/css/selector-specificity.html: * inspector/css/stylesheet-with-mutations.html: * inspector/debugger/break-on-exception-catch.html: * inspector/debugger/break-on-exception-finally.html: * inspector/debugger/break-on-exception-native.html: * inspector/debugger/break-on-exception-throw-in-promise-rethrow-in-catch.html: * inspector/debugger/break-on-exception-throw-in-promise-then-with-catch.html: * inspector/debugger/break-on-exception-throw-in-promise-then.html: * inspector/debugger/break-on-exception-throw-in-promise-with-catch.html: * inspector/debugger/break-on-exception-throw-in-promise.html: * inspector/debugger/break-on-exception-window-onerror.html: * inspector/debugger/break-on-exception.html: * inspector/debugger/break-on-uncaught-exception-catch.html: * inspector/debugger/break-on-uncaught-exception-finally.html: * inspector/debugger/break-on-uncaught-exception-native.html: * inspector/debugger/break-on-uncaught-exception-throw-in-promise-rethrow-in-catch.html: * inspector/debugger/break-on-uncaught-exception-throw-in-promise-then-with-catch.html: * inspector/debugger/break-on-uncaught-exception-throw-in-promise-then.html: * inspector/debugger/break-on-uncaught-exception-throw-in-promise-with-catch.html: * inspector/debugger/break-on-uncaught-exception-throw-in-promise.html: * inspector/debugger/break-on-uncaught-exception-window-onerror.html: * inspector/debugger/break-on-uncaught-exception.html: * inspector/debugger/breakpoint-action-eval.html: * inspector/debugger/breakpoint-columns.html: * inspector/debugger/breakpoint-scope.html: * inspector/debugger/command-line-api-exception-nested-catch.html: * inspector/debugger/command-line-api-exception.html: * inspector/debugger/js-stacktrace.html: * inspector/debugger/pause-reason.html: * inspector/debugger/probe-manager-add-remove-actions.html: * inspector/debugger/search-scripts-expected.txt: * inspector/debugger/search-scripts.html: * inspector/dom/content-flow-content-nodes.html: * inspector/dom/content-flow-content-removal.html: * inspector/dom/content-flow-list.html: * inspector/dom/content-node-region-info.html: * inspector/dom/highlight-shape-outside-margin.html: * inspector/dom/highlight-shape-outside.html: * inspector/dom/highlightSelector.html: * inspector/dom/pseudo-element-dynamic.html: * inspector/dom/pseudo-element-static.html: * inspector/dom/template-content.html: * inspector/event-listener-set.html: * inspector/event-listener.html: * inspector/model/parse-script-syntax-tree.html: * inspector/model/remote-object-get-properties.html: * inspector/model/remote-object-weak-collection.html: * inspector/model/remote-object.html: * inspector/page/main-frame-resource.html: * inspector/protocol-promise-result.html: * inspector/replay/javascript-date-now.html: * inspector/replay/javascript-random-seed.html: * inspector/replay/window-navigator-plugins-memoized.html: * inspector/test-harness-trivially-works.html: * inspector/timeline/debugger-paused-while-recording.html: * inspector/timeline/exception-in-injected-script-while-recording.html: * inspector/timeline/recording-start-stop-timestamps.html: * platform/efl/TestExpectations: * platform/gtk/TestExpectations: * platform/ios-simulator-wk1/TestExpectations: * platform/ios-simulator-wk2/TestExpectations: Canonical link: https://commits.webkit.org/165829@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-06 21:17:03 +00:00
<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
<script src="resources/breakpoint.js"></script>
<script>
function test()
{
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
InspectorProtocol.sendCommand("Debugger.enable", {});
Web Inspector: Cleanup inspector/debugger tests https://bugs.webkit.org/show_bug.cgi?id=156619 Reviewed by Brian Burg. Source/JavaScriptCore: While cleaning up the tests it exposed the fact that breakpoints were not getting disabled when the inspector closes. This means that opening the inspector, with breakpoints, and closing the inspector, would leave the JSC::Debugger thinking breakpoints are active. The JSC::Debugger should be reset. * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::disable): Source/WebInspectorUI: * UserInterface/Base/Main.js: (WebInspector.loaded): * UserInterface/Controllers/DebuggerManager.js: Remove agent checks for agents that are always available. LayoutTests: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: Activate breakpoints in protocol tests that may set breakpoints and pause. Inspector tests automatically enable breakpoints. * inspector/debugger/setVariableValue-expected.txt: Removed. * inspector/debugger/setVariableValue.html: Removed. * platform/gtk/TestExpectations: Remove references to bad test. The protocol command no longer exists. Canonical link: https://commits.webkit.org/174732@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-15 17:18:12 +00:00
InspectorProtocol.sendCommand("Debugger.setBreakpointsActive", {active: true});
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
var allowedToHitBreakpoint = false;
var breakpointIdentifier = null;
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
InspectorProtocol.eventHandler["Debugger.scriptParsed"] = function(messageObject)
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
{
if (/resources\/breakpoint\.js$/.test(messageObject.params.url)) {
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
ProtocolTest.log("Found breakpoint.js");
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
var scriptIdentifier = messageObject.params.scriptId;
var location = {scriptId: scriptIdentifier, lineNumber: 13, columnNumber: 0};
var options = {autoContinue: true};
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
InspectorProtocol.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
InspectorProtocol.checkForError(responseObject);
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
breakpointIdentifier = responseObject.result.breakpointId;
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
ProtocolTest.log("Running breakpointAutomaticallyContinue multiple times with automatically continue");
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"}, function() {
ProtocolTest.log("Removing breakpoint");
InspectorProtocol.sendCommand("Debugger.removeBreakpoint", {"breakpointId": breakpointIdentifier}, function(responseObject) {
InspectorProtocol.checkForError(responseObject);
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
allowedToHitBreakpoint = true;
options = {autoContinue: false};
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
ProtocolTest.log("Setting new breakpoint without autoContinue that should trigger");
InspectorProtocol.sendCommand("Debugger.setBreakpoint", {location: location, options: options}, function(responseObject) {
InspectorProtocol.checkForError(responseObject);
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "breakpointAutomaticallyContinue()"});
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
});
});
});
});
}
}
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
InspectorProtocol.eventHandler["Debugger.paused"] = function(messageObject)
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
{
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
ProtocolTest.log("Hit Breakpoint!");
Web Inspector: move InspectorFrontendAPIDispatcher to WebCore, clean up uses https://bugs.webkit.org/show_bug.cgi?id=217835 <rdar://problem/70384407> Reviewed by Devin Rousso. Source/WebCore: Expose the dispatcher as part of the InspectorFrontendClient API so that other code can use the dispatcher regardless of whether it's a WebInspectorUI or RemoteWebInspectorUI. Add an InspectorFrontendAPIDispatcher instance and getter to InspectorFrontendClientLocal. Adopt the JSONValue-based InspectorFrontendAPIDispatcher::dispatch() method in InspectorFrontendClientLocal. Remove the redundant parallel queuing implementation. Remove redundant public methods that are available on InspectorFrontendAPIDispatcher. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: Moved files. * inspector/InspectorFrontendAPIDispatcher.cpp: Renamed from Source/WebKit/WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.cpp. (WebCore::InspectorFrontendAPIDispatcher::InspectorFrontendAPIDispatcher): (WebCore::InspectorFrontendAPIDispatcher::reset): (WebCore::InspectorFrontendAPIDispatcher::frontendLoaded): (WebCore::InspectorFrontendAPIDispatcher::suspend): (WebCore::InspectorFrontendAPIDispatcher::unsuspend): (WebCore::InspectorFrontendAPIDispatcher::dispatchCommand): (WebCore::InspectorFrontendAPIDispatcher::dispatchMessageAsync): (WebCore::InspectorFrontendAPIDispatcher::evaluateOrQueueExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateQueuedExpressions): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpression): (WebCore::InspectorFrontendAPIDispatcher::evaluateExpressionForTesting): Add new dispatch() method. Remove other dispatch methods that can be expressed using the new JSON::Value-based method. If it's not possible to evaluate JS immediately, schedule a one-shot task to try again on a different event loop turn. * inspector/InspectorFrontendAPIDispatcher.h: Renamed from Source/WebKit/WebProcess/Inspector/WebInspectorFrontendAPIDispatcher.h. Add new dispatch() method which takes a vector of JSON::Value objects and serializes them into command arguments for the frontend. * inspector/InspectorFrontendClient.h: * inspector/InspectorFrontendClientLocal.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): (WebCore::InspectorFrontendClientLocal::frontendLoaded): (WebCore::InspectorFrontendClientLocal::pagePaused): (WebCore::InspectorFrontendClientLocal::pageUnpaused): (WebCore::InspectorFrontendClientLocal::setDockingUnavailable): (WebCore::InspectorFrontendClientLocal::setAttachedWindow): (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled): (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled): (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript): (WebCore::InspectorFrontendClientLocal::showConsole): (WebCore::InspectorFrontendClientLocal::showResources): (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame): Use InspectorFrontendAPIDispatcher to dispatch commands to the frontend. (WebCore::InspectorFrontendClientLocal::dispatch): Deleted. (WebCore::InspectorFrontendClientLocal::dispatchMessage): Deleted. (WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Deleted. (WebCore::InspectorFrontendClientLocal::evaluateOnLoad): Deleted. These are redundant with InspectorFrontendAPIDispatcher. * testing/Internals.cpp: (WebCore::InspectorStubFrontend::sendMessageToFrontend): Use frontend dispatcher directly. Source/WebKit: Adopt the JSONValue-based InspectorFrontendAPIDispatcher::dispatch() method in WebInspectorUI and RemoteInspectorUI methods that dispatch to the frontend. * Sources.txt: * WebKit.xcodeproj/project.pbxproj: Move files. * WebProcess/Inspector/RemoteWebInspectorUI.h: * WebProcess/Inspector/RemoteWebInspectorUI.cpp: (WebKit::RemoteWebInspectorUI::RemoteWebInspectorUI): (WebKit::RemoteWebInspectorUI::initialize): (WebKit::RemoteWebInspectorUI::updateFindString): (WebKit::RemoteWebInspectorUI::didSave): (WebKit::RemoteWebInspectorUI::didAppend): (WebKit::RemoteWebInspectorUI::frontendLoaded): (WebKit::RemoteWebInspectorUI::sendMessageToFrontend): (WebKit::RemoteWebInspectorUI::pagePaused): (WebKit::RemoteWebInspectorUI::pageUnpaused): (WebKit::RemoteWebInspectorUI::setDiagnosticLoggingAvailable): * WebProcess/Inspector/WebInspectorUI.h: * WebProcess/Inspector/WebInspectorUI.cpp: (WebKit::WebInspectorUI::WebInspectorUI): (WebKit::WebInspectorUI::setDockSide): (WebKit::WebInspectorUI::setDockingUnavailable): (WebKit::WebInspectorUI::setIsVisible): (WebKit::WebInspectorUI::updateFindString): (WebKit::WebInspectorUI::setDiagnosticLoggingAvailable): (WebKit::WebInspectorUI::showConsole): (WebKit::WebInspectorUI::showResources): (WebKit::WebInspectorUI::showMainResourceForFrame): (WebKit::WebInspectorUI::startPageProfiling): (WebKit::WebInspectorUI::stopPageProfiling): (WebKit::WebInspectorUI::startElementSelection): (WebKit::WebInspectorUI::stopElementSelection): (WebKit::WebInspectorUI::didSave): (WebKit::WebInspectorUI::didAppend): (WebKit::WebInspectorUI::sendMessageToFrontend): (WebKit::WebInspectorUI::evaluateInFrontendForTesting): (WebKit::WebInspectorUI::pagePaused): (WebKit::WebInspectorUI::pageUnpaused): * WebProcess/WebCoreSupport/WebChromeClient.cpp: Add missing header includes (related to unified sources changes from r269168). Source/WebKitLegacy/cf: * WebCoreSupport/WebInspectorClientCF.cpp: (WebInspectorClient::sendMessageToFrontend): LayoutTests: * inspector/dom/dom-remove-events.html: * inspector/dom/remove-multiple-nodes.html: The order of events received has changed slightly due to the new auto-suspend behavior in InspectorFrontendAPIDispatcher. Remove event handlers when the test is complete to ensure that events which arrive after the test has finished do not stomp on the expected results. * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: Some tests seem to call ProtocolTest.completeTest() from the handler of Debugger.paused, when the debugger is still paused. This causes timeouts after this refactoring, since not resuming means that we'll get stuck in the debugger's nested run loop and never return. Canonical link: https://commits.webkit.org/231071@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-30 23:56:26 +00:00
InspectorProtocol.sendCommand("Debugger.disable");
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
if (!allowedToHitBreakpoint) {
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
ProtocolTest.log("FAIL: should not have hit breakpoint.");
ProtocolTest.completeTest();
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
} else {
Web Inspector: use different namespaces in test fixtures for protocol tests and frontend tests https://bugs.webkit.org/show_bug.cgi?id=147787 Patch by Brian Burg <bburg@apple.com> on 2015-08-11 Reviewed by Timothy Hatcher. Refactor test methods to use three distinct namespaces to reflect their implementation: - InspectorProtocol contains commands that are only used from within protocol tests. This includes sending and receiving protocol messages and checking message errors. - InspectorTest contains test methods for full inspector frontend tests. - ProtocolTest contains test methods for protocol tests. In a subsequent patch, most methods in InspectorTest and ProtocolTest namespaces will be unified so that implementations of log, assert, etc. are no longer duplicated. For now, at least make it obvious at each callsite what code is being invoked. * http/tests/inspector/console/access-inspected-object.html: * http/tests/inspector/dom/resources/InspectorDOMListener.js: * http/tests/inspector/page/loading-iframe-document-node.html: * http/tests/inspector/resources/ProtocolTestStub.js: * http/tests/inspector/resources/console-test.js: * http/tests/inspector/resources/probe-test.js: * inspector/console/console-message.html: * inspector/console/css-source-locations.html: * inspector/console/js-source-locations.html: * inspector/console/x-frame-options-message.html: * inspector/css/getSupportedCSSProperties.html: * inspector/debugger/breakpoint-action-detach.html: * inspector/debugger/breakpoint-action-with-exception.html: * inspector/debugger/breakpoint-condition-detach.html: * inspector/debugger/breakpoint-condition-with-bad-script.html: * inspector/debugger/breakpoint-condition-with-exception.html: * inspector/debugger/breakpoint-eval-with-exception.html: * inspector/debugger/breakpoint-inside-conditons-and-actions.html: * inspector/debugger/call-frame-function-name.html: * inspector/debugger/call-frame-this-host.html: * inspector/debugger/call-frame-this-nonstrict.html: * inspector/debugger/call-frame-this-strict.html: * inspector/debugger/debugger-statement.html: * inspector/debugger/didSampleProbe-multiple-probes.html: * inspector/debugger/hit-breakpoint-from-console.html: * inspector/debugger/nested-inspectors.html: * inspector/debugger/pause-dedicated-worker.html: * inspector/debugger/pause-on-assert.html: * inspector/debugger/regress-133182.html: * inspector/debugger/removeBreakpoint.html: * inspector/debugger/searchInContent-linebreaks.html: * inspector/debugger/setBreakpoint-actions.html: * inspector/debugger/setBreakpoint-autoContinue.html: * inspector/debugger/setBreakpoint-column.html: * inspector/debugger/setBreakpoint-condition.html: * inspector/debugger/setBreakpoint-dfg-and-modify-local.html: * inspector/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local.html: * inspector/debugger/setBreakpoint-dfg.html: * inspector/debugger/setBreakpoint-options-exception.html: * inspector/debugger/setBreakpoint.html: * inspector/debugger/setBreakpointByUrl-sourceURL.html: * inspector/debugger/setPauseOnExceptions-all.html: * inspector/debugger/setPauseOnExceptions-none.html: * inspector/debugger/setPauseOnExceptions-uncaught.html: * inspector/debugger/setVariableValue.html: * inspector/debugger/terminate-dedicated-worker-while-paused.html: * inspector/dom-debugger/node-removed.html: * inspector/dom/dom-remove-events.html: * inspector/dom/dom-search-crash.html: * inspector/dom/dom-search-with-context.html: * inspector/dom/dom-search.html: * inspector/dom/focus.html: * inspector/dom/getAccessibilityPropertiesForNode.html: * inspector/dom/getAccessibilityPropertiesForNode_liveRegion.html: * inspector/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: * inspector/dom/highlight-flow-with-no-region.html: * inspector/dom/remove-multiple-nodes.html: * inspector/dom/request-child-nodes-depth.html: * inspector/layers/layers-anonymous.html: * inspector/layers/layers-blending-compositing-reasons.html: * inspector/layers/layers-compositing-reasons.html: * inspector/layers/layers-for-node.html: * inspector/layers/layers-generated-content.html: * inspector/layers/layers-reflected-content.html: * inspector/page/archive.html: * inspector/page/frameScheduledNavigation.html: * inspector/page/frameStartedLoading.html: * inspector/page/javascriptDialogEvents.html: * inspector/page/setEmulatedMedia.html: * inspector/runtime/getProperties.html: * inspector/unit-tests/async-test-suite.html: * inspector/unit-tests/sync-test-suite.html: Canonical link: https://commits.webkit.org/165990@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-08-11 18:28:31 +00:00
ProtocolTest.log("PASS: hit breakpoint when allowed.");
ProtocolTest.completeTest();
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
}
}
}
</script>
</head>
<body onload="runTest()">
<p>Debugger.setBreakpoint options.autoContinue</p>
Web Inspector: Breakpoints should have Automatically Continue Option https://bugs.webkit.org/show_bug.cgi?id=120187 Reviewed by Timothy Hatcher. Source/WebCore: Tests: inspector-protocol/debugger/removeBreakpoint.html inspector-protocol/debugger/setBreakpoint-autoContinue.html inspector-protocol/debugger/setBreakpoint-column.html inspector-protocol/debugger/setBreakpoint-condition.html inspector-protocol/debugger/setBreakpoint.html * inspector/Inspector.json: Convert the "condition" argument of setBreakpoint and setBreakpointByUrl to a BreakpointOptions object with optional properties. One of which is "condition" and a new option "autoContinue". * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::pauseIfNeeded): Automatically continue if the breakpoint was hit and has autoContinue. * inspector/InspectorDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::buildObjectForBreakpointCookie): (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::continueToLocation): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): Handle the new incoming BreakpointOptions type, and set the autoContinue state on ScriptBreakpoints. * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByURL): (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId): Update old front-end to be compatible with the new API. Source/WebInspectorUI: * Localizations/en.lproj/localizedStrings.js: * UserInterface/Breakpoint.css: (#edit-breakpoint-popoover-auto-continue): Misc. changes for UI. * UserInterface/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get autoContinue): (WebInspector.Breakpoint.prototype.set autoContinue): (WebInspector.Breakpoint.prototype.get options): (WebInspector.Breakpoint.prototype.get info): General maintenance of the autoContinue state. (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Edit Breakpoint UI for setting autoContinue state. * UserInterface/InspectorBackend.js: (InspectorBackendClass.prototype.registerCommand): (InspectorBackendClass.prototype._supports): Extension to check if a BackendCommands method supports a particular param. * UserInterface/DebuggerManager.js: (WebInspector.DebuggerManager): (WebInspector.DebuggerManager.prototype._setBreakpoint): * UserInterface/InspectorBackendCommands.js: Change to backend agent calls for the new protocol API. LayoutTests: * http/tests/inspector-protocol/resources/InspectorTest.js: (InspectorTest.checkForError): Helper for checking for, and logging, protocol error responses. * inspector/debugger/set-breakpoint.html: Update this test for the protocol change. * inspector-protocol/debugger/removeBreakpoint-expected.txt: Added. * inspector-protocol/debugger/removeBreakpoint.html: Added. * inspector-protocol/debugger/resources/breakpoint.js: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-autoContinue.html: Added. * inspector-protocol/debugger/setBreakpoint-column.html: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint.html. * inspector-protocol/debugger/setBreakpoint-column.txt: Renamed from LayoutTests/inspector-protocol/debugger/column-breakpoint-expected.txt. * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint-condition.html: Added. * inspector-protocol/debugger/setBreakpoint-expected.txt: Added. * inspector-protocol/debugger/setBreakpoint.html: Added. Protocol tests for setting breakpoints. These test different aspects of the Debugger domain (setBreakpoint variants and removeBreakpoint). Canonical link: https://commits.webkit.org/138538@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-30 21:42:59 +00:00
</body>
</html>