haikuwebkit/LayoutTests/inspector/debugger/setPauseOnExceptions-none.html

49 lines
3.1 KiB
HTML
Raw Permalink Normal View History

<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>
<script src="resources/exception.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: 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.setPauseOnExceptions", {state: "none"}, function(responseObject) {
InspectorProtocol.checkForError(responseObject);
ProtocolTest.log("Debugger.setPauseOnExceptions - none");
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { 1+1; }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { noException(); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(noException, 7); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { try{ ({}).a.b.c.d } catch (e) { console.log(`caught inline: ${stringifyError(e)}`); } }, 0);"});
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("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionBasic, 1); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionDOM, 2); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(exceptionInHostFunction, 3); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwString, 10); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { catchNested(throwParam, 5, new Error('error message')); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { {}.a.b.c.d; }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionBasic(); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionDOM(); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { exceptionInHostFunction(); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwString(); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam({x:1}); }, 0);"});
InspectorProtocol.sendCommand("Runtime.evaluate", {expression: "setTimeout(function() { throwParam(new Error('error message')); }, 0);"}, function() {
Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer https://bugs.webkit.org/show_bug.cgi?id=127409 Reviewed by Geoffrey Garen. Source/JavaScriptCore: * inspector/InspectorAgentBase.h: When disconnecting agents, provide a InspectorDisconnectReason for the disconnection. It could be that an inspector frontend is just disconnecting or that the inspected object is going away entirely and we can avoid doing some work. * runtime/JSGlobalObjectDebuggable.h: * runtime/JSGlobalObjectDebuggable.cpp: (JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable): (JSC::JSGlobalObjectDebuggable::disconnect): (JSC::JSGlobalObjectDebuggable::disconnectInternal): Pass different reasons for the different disconnects. * inspector/InspectorAgentRegistry.cpp: (Inspector::InspectorAgentRegistry::willDestroyFrontendAndBackend): * inspector/InspectorAgentRegistry.h: * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::disconnectFrontend): * inspector/JSGlobalObjectInspectorController.h: * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::willDestroyFrontendAndBackend): * inspector/agents/InspectorAgent.h: Pass InspectorDisconnectReason around where needed. Source/WebCore: No new tests (OOPS!). * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): Remove m_recompileTimer and the recompile soon function. We can just recompile immediately in all existing cases. * bindings/js/PageScriptDebugServer.h: * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): (WebCore::PageScriptDebugServer::removeListener): (WebCore::PageScriptDebugServer::recompileAllJSFunctions): (WebCore::PageScriptDebugServer::didAddFirstListener): (WebCore::PageScriptDebugServer::didRemoveLastListener): Add a "didAddFirstListener" to match "didRemoveLastListener". Only recompile functions when we attach the debugger and when we detach the last listener. * bindings/js/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::addListener): (WebCore::WorkerScriptDebugServer::removeListener): (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions): Same thing. Also rearrange the functions to read better. * inspector/InspectorProfilerAgent.cpp: Use the direct recompile function instead of the removed "soon" version. * WebCore.exp.in: Update disconnectFrontend symbol. * page/PageDebuggable.cpp: (WebCore::PageDebuggable::disconnect): * testing/Internals.cpp: (WebCore::Internals::closeDummyInspectorFrontend): * workers/WorkerMessagingProxy.cpp: (WebCore::disconnectFromWorkerGlobalScopeInspectorTask): Include an InspectorDisconnectReason when calling disconnectFrontend. * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend): If the disconnect reason is the page will be destroyed, don't recompile when disconnecting. * inspector/InspectorProfilerAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend): If the disconnect reason is the page will be destroyed, don't recompile when disconnecting. * inspector/InspectorController.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::inspectedPageDestroyed): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::close): Pass different reasons for the different disconnect reasons. * inspector/WorkerInspectorController.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::~WorkerInspectorController): (WebCore::WorkerInspectorController::disconnectFrontend): Pass different reasons for the different disconnect reasons. * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend): * inspector/InspectorCSSAgent.h: * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend): * inspector/InspectorCanvasAgent.h: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend): * inspector/InspectorConsoleAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorHeapProfilerAgent.cpp: (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend): * inspector/InspectorHeapProfilerAgent.h: * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend): * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorInputAgent.cpp: (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend): * inspector/InspectorInputAgent.h: * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend): * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): * inspector/InspectorTimelineAgent.h: * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend): * inspector/InspectorWorkerAgent.h: * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::disable): (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): * inspector/PageDebuggerAgent.h: * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend): * inspector/PageRuntimeAgent.h: * inspector/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): * inspector/WorkerDebuggerAgent.h: * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend): * inspector/WorkerRuntimeAgent.h: Include InspectorDisconnectReason param. Source/WebKit/efl: * WebCoreSupport/InspectorClientEfl.cpp: (WebCore::InspectorFrontendClientEfl::destroyInspectorWindow): Include InspectorDisconnectReason. Source/WebKit/gtk: * WebCoreSupport/InspectorClientGtk.cpp: (WebKit::InspectorFrontendClient::destroyInspectorWindow): Include InspectorDisconnectReason. Source/WebKit/mac: * WebCoreSupport/WebInspectorClient.mm: (-[WebInspectorWindowController destroyInspectorView:]): Include InspectorDisconnectReason. Source/WebKit/win: * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorFrontendClient::destroyInspectorView): Include InspectorDisconnectReason. Source/WebKit2: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: (WebKit::WebInspectorFrontendClient::closeWindow): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::remoteFrontendDisconnected): Include InspectorDisconnectReason. LayoutTests: Remove "Breakpoints Enabled" output in tests. Breakpoints are already enabled by default in tests. Also since the DebuggerAgent.enable() call now immediately recompiles scripts, sourceParsed events are now sent to the frontend earlier even before the setBreakpointsActive message has been processed, so the "Breakpoints Enabled" output was showing up later, seemingly randomly in tests, and is no longer helpful. * inspector-protocol/debugger/breakpoint-action-detach-expected.txt: * inspector-protocol/debugger/breakpoint-action-detach.html: * inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt: * inspector-protocol/debugger/breakpoint-action-with-exception.html: * inspector-protocol/debugger/breakpoint-condition-detach-expected.txt: * inspector-protocol/debugger/breakpoint-condition-detach.html: * inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt: * inspector-protocol/debugger/breakpoint-condition-with-exception.html: * inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt: * inspector-protocol/debugger/breakpoint-eval-with-exception.html: * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt: * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html: * inspector-protocol/debugger/call-frame-function-name-expected.txt: * inspector-protocol/debugger/call-frame-function-name.html: * inspector-protocol/debugger/call-frame-this-host-expected.txt: * inspector-protocol/debugger/call-frame-this-host.html: * inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt: * inspector-protocol/debugger/call-frame-this-nonstrict.html: * inspector-protocol/debugger/call-frame-this-strict-expected.txt: * inspector-protocol/debugger/call-frame-this-strict.html: * inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt: * inspector-protocol/debugger/didSampleProbe-multiple-probes.html: * inspector-protocol/debugger/nested-inspectors-expected.txt: * inspector-protocol/debugger/nested-inspectors.html: * inspector-protocol/debugger/removeBreakpoint-expected.txt: * inspector-protocol/debugger/removeBreakpoint.html: * inspector-protocol/debugger/setBreakpoint-actions-expected.txt: * inspector-protocol/debugger/setBreakpoint-actions.html: * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: * inspector-protocol/debugger/setBreakpoint-autoContinue.html: * inspector-protocol/debugger/setBreakpoint-column-expected.txt: * inspector-protocol/debugger/setBreakpoint-column.html: * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: * inspector-protocol/debugger/setBreakpoint-condition.html: * inspector-protocol/debugger/setBreakpoint-expected.txt: * inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt: * inspector-protocol/debugger/setBreakpoint-options-exception.html: * inspector-protocol/debugger/setBreakpoint.html: * inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt: * inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html: * inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt: * inspector-protocol/debugger/setPauseOnExceptions-all.html: * inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt: * inspector-protocol/debugger/setPauseOnExceptions-none.html: * inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt: * inspector-protocol/debugger/setPauseOnExceptions-uncaught.html: * inspector-protocol/dom-debugger/node-removed-expected.txt: * inspector-protocol/dom-debugger/node-removed.html: Canonical link: https://commits.webkit.org/145546@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-01-24 02:38:08 +00:00
setTimeout(function() {
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: No pauses");
ProtocolTest.completeTest();
Web Inspector: Remove recompileAllJSFunctions timer in ScriptDebugServer https://bugs.webkit.org/show_bug.cgi?id=127409 Reviewed by Geoffrey Garen. Source/JavaScriptCore: * inspector/InspectorAgentBase.h: When disconnecting agents, provide a InspectorDisconnectReason for the disconnection. It could be that an inspector frontend is just disconnecting or that the inspected object is going away entirely and we can avoid doing some work. * runtime/JSGlobalObjectDebuggable.h: * runtime/JSGlobalObjectDebuggable.cpp: (JSC::JSGlobalObjectDebuggable::~JSGlobalObjectDebuggable): (JSC::JSGlobalObjectDebuggable::disconnect): (JSC::JSGlobalObjectDebuggable::disconnectInternal): Pass different reasons for the different disconnects. * inspector/InspectorAgentRegistry.cpp: (Inspector::InspectorAgentRegistry::willDestroyFrontendAndBackend): * inspector/InspectorAgentRegistry.h: * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::disconnectFrontend): * inspector/JSGlobalObjectInspectorController.h: * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::willDestroyFrontendAndBackend): * inspector/agents/InspectorAgent.h: Pass InspectorDisconnectReason around where needed. Source/WebCore: No new tests (OOPS!). * bindings/js/ScriptDebugServer.h: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::ScriptDebugServer): Remove m_recompileTimer and the recompile soon function. We can just recompile immediately in all existing cases. * bindings/js/PageScriptDebugServer.h: * bindings/js/PageScriptDebugServer.cpp: (WebCore::PageScriptDebugServer::addListener): (WebCore::PageScriptDebugServer::removeListener): (WebCore::PageScriptDebugServer::recompileAllJSFunctions): (WebCore::PageScriptDebugServer::didAddFirstListener): (WebCore::PageScriptDebugServer::didRemoveLastListener): Add a "didAddFirstListener" to match "didRemoveLastListener". Only recompile functions when we attach the debugger and when we detach the last listener. * bindings/js/WorkerScriptDebugServer.cpp: (WebCore::WorkerScriptDebugServer::addListener): (WebCore::WorkerScriptDebugServer::removeListener): (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions): Same thing. Also rearrange the functions to read better. * inspector/InspectorProfilerAgent.cpp: Use the direct recompile function instead of the removed "soon" version. * WebCore.exp.in: Update disconnectFrontend symbol. * page/PageDebuggable.cpp: (WebCore::PageDebuggable::disconnect): * testing/Internals.cpp: (WebCore::Internals::closeDummyInspectorFrontend): * workers/WorkerMessagingProxy.cpp: (WebCore::disconnectFromWorkerGlobalScopeInspectorTask): Include an InspectorDisconnectReason when calling disconnectFrontend. * inspector/InspectorDatabaseAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::disable): (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend): If the disconnect reason is the page will be destroyed, don't recompile when disconnecting. * inspector/InspectorProfilerAgent.h: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::enable): (WebCore::InspectorProfilerAgent::disable): (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend): If the disconnect reason is the page will be destroyed, don't recompile when disconnecting. * inspector/InspectorController.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::inspectedPageDestroyed): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::close): Pass different reasons for the different disconnect reasons. * inspector/WorkerInspectorController.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::~WorkerInspectorController): (WebCore::WorkerInspectorController::disconnectFrontend): Pass different reasons for the different disconnect reasons. * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend): * inspector/InspectorCSSAgent.h: * inspector/InspectorCanvasAgent.cpp: (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend): * inspector/InspectorCanvasAgent.h: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend): * inspector/InspectorConsoleAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorHeapProfilerAgent.cpp: (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend): * inspector/InspectorHeapProfilerAgent.h: * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend): * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorInputAgent.cpp: (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend): * inspector/InspectorInputAgent.h: * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend): * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorMemoryAgent.cpp: (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend): * inspector/InspectorMemoryAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend): * inspector/InspectorPageAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): * inspector/InspectorTimelineAgent.h: * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend): * inspector/InspectorWorkerAgent.h: * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::disable): (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer): * inspector/PageDebuggerAgent.h: * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend): * inspector/PageRuntimeAgent.h: * inspector/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::stopListeningScriptDebugServer): * inspector/WorkerDebuggerAgent.h: * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend): * inspector/WorkerRuntimeAgent.h: Include InspectorDisconnectReason param. Source/WebKit/efl: * WebCoreSupport/InspectorClientEfl.cpp: (WebCore::InspectorFrontendClientEfl::destroyInspectorWindow): Include InspectorDisconnectReason. Source/WebKit/gtk: * WebCoreSupport/InspectorClientGtk.cpp: (WebKit::InspectorFrontendClient::destroyInspectorWindow): Include InspectorDisconnectReason. Source/WebKit/mac: * WebCoreSupport/WebInspectorClient.mm: (-[WebInspectorWindowController destroyInspectorView:]): Include InspectorDisconnectReason. Source/WebKit/win: * WebCoreSupport/WebInspectorClient.cpp: (WebInspectorFrontendClient::destroyInspectorView): Include InspectorDisconnectReason. Source/WebKit2: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: (WebKit::WebInspectorFrontendClient::closeWindow): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::remoteFrontendDisconnected): Include InspectorDisconnectReason. LayoutTests: Remove "Breakpoints Enabled" output in tests. Breakpoints are already enabled by default in tests. Also since the DebuggerAgent.enable() call now immediately recompiles scripts, sourceParsed events are now sent to the frontend earlier even before the setBreakpointsActive message has been processed, so the "Breakpoints Enabled" output was showing up later, seemingly randomly in tests, and is no longer helpful. * inspector-protocol/debugger/breakpoint-action-detach-expected.txt: * inspector-protocol/debugger/breakpoint-action-detach.html: * inspector-protocol/debugger/breakpoint-action-with-exception-expected.txt: * inspector-protocol/debugger/breakpoint-action-with-exception.html: * inspector-protocol/debugger/breakpoint-condition-detach-expected.txt: * inspector-protocol/debugger/breakpoint-condition-detach.html: * inspector-protocol/debugger/breakpoint-condition-with-exception-expected.txt: * inspector-protocol/debugger/breakpoint-condition-with-exception.html: * inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt: * inspector-protocol/debugger/breakpoint-eval-with-exception.html: * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions-expected.txt: * inspector-protocol/debugger/breakpoint-inside-conditons-and-actions.html: * inspector-protocol/debugger/call-frame-function-name-expected.txt: * inspector-protocol/debugger/call-frame-function-name.html: * inspector-protocol/debugger/call-frame-this-host-expected.txt: * inspector-protocol/debugger/call-frame-this-host.html: * inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt: * inspector-protocol/debugger/call-frame-this-nonstrict.html: * inspector-protocol/debugger/call-frame-this-strict-expected.txt: * inspector-protocol/debugger/call-frame-this-strict.html: * inspector-protocol/debugger/didSampleProbe-multiple-probes-expected.txt: * inspector-protocol/debugger/didSampleProbe-multiple-probes.html: * inspector-protocol/debugger/nested-inspectors-expected.txt: * inspector-protocol/debugger/nested-inspectors.html: * inspector-protocol/debugger/removeBreakpoint-expected.txt: * inspector-protocol/debugger/removeBreakpoint.html: * inspector-protocol/debugger/setBreakpoint-actions-expected.txt: * inspector-protocol/debugger/setBreakpoint-actions.html: * inspector-protocol/debugger/setBreakpoint-autoContinue-expected.txt: * inspector-protocol/debugger/setBreakpoint-autoContinue.html: * inspector-protocol/debugger/setBreakpoint-column-expected.txt: * inspector-protocol/debugger/setBreakpoint-column.html: * inspector-protocol/debugger/setBreakpoint-condition-expected.txt: * inspector-protocol/debugger/setBreakpoint-condition.html: * inspector-protocol/debugger/setBreakpoint-expected.txt: * inspector-protocol/debugger/setBreakpoint-options-exception-expected.txt: * inspector-protocol/debugger/setBreakpoint-options-exception.html: * inspector-protocol/debugger/setBreakpoint.html: * inspector-protocol/debugger/setBreakpointByUrl-sourceURL-expected.txt: * inspector-protocol/debugger/setBreakpointByUrl-sourceURL.html: * inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt: * inspector-protocol/debugger/setPauseOnExceptions-all.html: * inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt: * inspector-protocol/debugger/setPauseOnExceptions-none.html: * inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt: * inspector-protocol/debugger/setPauseOnExceptions-uncaught.html: * inspector-protocol/dom-debugger/node-removed-expected.txt: * inspector-protocol/dom-debugger/node-removed.html: Canonical link: https://commits.webkit.org/145546@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-01-24 02:38:08 +00:00
}, 10);
});
});
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: 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("Paused!");
ProtocolTest.log("FAIL");
ProtocolTest.completeTest();
}
}
</script>
</head>
<body onload="runTest()">
<p>Debugger.setPauseOnExceptions none</p>
</body>
</html>