haikuwebkit/LayoutTests/inspector/dom/request-child-nodes-depth.html

163 lines
4.7 KiB
HTML
Raw Permalink Normal View History

Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
<html>
<head>
<script src="../../http/tests/inspector/resources/protocol-test.js"></script>
Web Inspector: Consolidate inspector-protocol tests into domains https://bugs.webkit.org/show_bug.cgi?id=120450 Reviewed by Timothy Hatcher. Move around tests and clean them up in the process. * http/tests/inspector-protocol/resources/protocol-test.js: * inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt. * inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html. * inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt. * inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html. * inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt. * inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html. * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: * inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html: * inspector-protocol/heap-profiler/take-heap-snapshot.html: * inspector-protocol/nmi-webaudio-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test.html: Removed. * inspector-protocol/nmi-webaudio.html: Removed. * inspector-protocol/page/frameScheduledNavigation.html: * inspector-protocol/page/frameStartedLoading.html: * inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html. * inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt. * inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html. * inspector-protocol/resources/audio-context.html: Removed. * inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt. * inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html. * platform/efl/TestExpectations: * platform/gtk-wk1/TestExpectations: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Canonical link: https://commits.webkit.org/138459@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-29 18:58:45 +00:00
<script>
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
function test()
{
var firstDiv;
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
var eventsCount = 0;
getDocument();
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["DOM.setChildNodes"] = function setChildNodes(messageObject)
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
{
eventsCount++;
if (eventsCount === 1)
gotImmediateChildren(messageObject);
else if (eventsCount === 2)
gotAdditionalChildren(messageObject);
else if (eventsCount === 3)
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
gotAllChildren(messageObject);
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(JSON.stringify(messageObject, null, " "));
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
};
Web Inspector: Consolidate inspector-protocol tests into domains https://bugs.webkit.org/show_bug.cgi?id=120450 Reviewed by Timothy Hatcher. Move around tests and clean them up in the process. * http/tests/inspector-protocol/resources/protocol-test.js: * inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt. * inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html. * inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt. * inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html. * inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt. * inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html. * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: * inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html: * inspector-protocol/heap-profiler/take-heap-snapshot.html: * inspector-protocol/nmi-webaudio-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test.html: Removed. * inspector-protocol/nmi-webaudio.html: Removed. * inspector-protocol/page/frameScheduledNavigation.html: * inspector-protocol/page/frameStartedLoading.html: * inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html. * inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt. * inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html. * inspector-protocol/resources/audio-context.html: Removed. * inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt. * inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html. * platform/efl/TestExpectations: * platform/gtk-wk1/TestExpectations: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Canonical link: https://commits.webkit.org/138459@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-29 18:58:45 +00:00
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
function getDocument()
{
// We must first get the document so that later on we may get sensible nodeIds.
step({
name: "Get the Document",
command: "DOM.getDocument",
parameters: {},
callback: getImmediateChildren
});
};
function getImmediateChildren(result)
{
var bodyId = result.root.children[0].children[1].nodeId;
step({
name: "Get immediate children of the body",
command: "DOM.requestChildNodes",
parameters: {"nodeId": bodyId}
});
};
function gotImmediateChildren(messageObject)
{
firstDiv = messageObject.params.nodes[0];
assert("First child is a div", firstDiv.localName, "div");
assert("First child is div#depth-1", firstDiv.attributes[1], "depth-1");
assert("First child has one child", firstDiv.childNodeCount, 1);
assert("First child has no .children property", firstDiv.children, undefined);
step({
name: "Get children of div#depth-1 three levels deep",
command: "DOM.requestChildNodes",
parameters: {"nodeId": firstDiv.nodeId, "depth": 3}
});
};
function gotAdditionalChildren(messageObject)
{
var depth = 1;
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
var firstChild = messageObject.params.nodes[0];
var node = firstChild;
while (node && node.children) {
depth++;
node = node.children[0];
}
assert("div#depth-1 has nodes 3 levels deep", depth, 3);
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
step({
name: "Get all children of body",
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
command: "DOM.requestChildNodes",
parameters: {"nodeId": firstDiv.nodeId, "depth": -1}
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
});
};
function gotAllChildren(messageObject)
{
var depth = 1;
var firstChild = messageObject.params.nodes[0];
var node = firstChild;
while (node && node.children) {
depth++;
node = node.children[0];
}
// We have requested nodes 3-level deep so far, so
// we should have gotten an additional 6 levels of depth.
assert("div#depth-1 has nodes 9 levels deep", depth, 6);
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
step({
name: "Pass an invalid depth",
command: "DOM.requestChildNodes",
parameters: {"nodeId": firstDiv.nodeId, "depth": 0},
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
callback: finishTest
});
};
Web Inspector: Consolidate inspector-protocol tests into domains https://bugs.webkit.org/show_bug.cgi?id=120450 Reviewed by Timothy Hatcher. Move around tests and clean them up in the process. * http/tests/inspector-protocol/resources/protocol-test.js: * inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt. * inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html. * inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt. * inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html. * inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt. * inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html. * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: * inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html: * inspector-protocol/heap-profiler/take-heap-snapshot.html: * inspector-protocol/nmi-webaudio-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test.html: Removed. * inspector-protocol/nmi-webaudio.html: Removed. * inspector-protocol/page/frameScheduledNavigation.html: * inspector-protocol/page/frameStartedLoading.html: * inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html. * inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt. * inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html. * inspector-protocol/resources/audio-context.html: Removed. * inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt. * inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html. * platform/efl/TestExpectations: * platform/gtk-wk1/TestExpectations: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Canonical link: https://commits.webkit.org/138459@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-29 18:58:45 +00:00
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
function finishTest()
{
assert("Expected number of setChildNodes events", eventsCount, 3);
Web Inspector: Consolidate inspector-protocol tests into domains https://bugs.webkit.org/show_bug.cgi?id=120450 Reviewed by Timothy Hatcher. Move around tests and clean them up in the process. * http/tests/inspector-protocol/resources/protocol-test.js: * inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt. * inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html. * inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt. * inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html. * inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt. * inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html. * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: * inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html: * inspector-protocol/heap-profiler/take-heap-snapshot.html: * inspector-protocol/nmi-webaudio-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test.html: Removed. * inspector-protocol/nmi-webaudio.html: Removed. * inspector-protocol/page/frameScheduledNavigation.html: * inspector-protocol/page/frameStartedLoading.html: * inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html. * inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt. * inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html. * inspector-protocol/resources/audio-context.html: Removed. * inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt. * inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html. * platform/efl/TestExpectations: * platform/gtk-wk1/TestExpectations: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Canonical link: https://commits.webkit.org/138459@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-29 18:58:45 +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.completeTest();
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
};
function step(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
ProtocolTest.log("\n=== " + test.name + " ===\n");
InspectorProtocol.sendCommand(test.command, test.parameters, function(messageObject) {
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
if (messageObject.hasOwnProperty("error"))
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("Backend error: " + messageObject.error.message + " (" + messageObject.error.code + ")\n");
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
if (test.callback)
test.callback(messageObject.result);
});
};
function assert(message, actual, expected)
{
if (actual === expected)
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: " + message);
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +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("FAIL: " + message + ", expected \"" + expected + "\" but got \"" + actual + "\"");
ProtocolTest.completeTest();
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
}
};
};
Web Inspector: Consolidate inspector-protocol tests into domains https://bugs.webkit.org/show_bug.cgi?id=120450 Reviewed by Timothy Hatcher. Move around tests and clean them up in the process. * http/tests/inspector-protocol/resources/protocol-test.js: * inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt. * inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html. * inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt. * inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html. * inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt. * inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html. * inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html: * inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html: * inspector-protocol/heap-profiler/take-heap-snapshot.html: * inspector-protocol/nmi-webaudio-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed. * inspector-protocol/nmi-webaudio-leak-test.html: Removed. * inspector-protocol/nmi-webaudio.html: Removed. * inspector-protocol/page/frameScheduledNavigation.html: * inspector-protocol/page/frameStartedLoading.html: * inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html. * inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt. * inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html. * inspector-protocol/resources/audio-context.html: Removed. * inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt. * inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html. * platform/efl/TestExpectations: * platform/gtk-wk1/TestExpectations: * platform/gtk/TestExpectations: * platform/mac/TestExpectations: * platform/qt/TestExpectations: * platform/win/TestExpectations: * platform/wincairo/TestExpectations: Canonical link: https://commits.webkit.org/138459@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-29 18:58:45 +00:00
window.addEventListener("DOMContentLoaded", function() {
Web Inspector: Option+Click on Node Expander Doesn't Work the First Time https://bugs.webkit.org/show_bug.cgi?id=66868 Source/WebCore: Up to now, the TreeElement.prototype.expandRecursively() method would correctly expand children recursively based on the provided depth, but would not wait to perform this task until all child nodes had been populated, which means that this would only work incrementally with one additional level of child nodes being shown expanded in the DOM tree upon alt+clicking a given node with a deep hierarchy. In order to fix this, this patch adds a new optional argument to the DOMAgent's requestChildNodes() methods to provide the depth at which we want to retrieve children of a given node. The DOMAgent provides a new .getSubtree() method that calls requestChildNodes() with the provided depth. Then in ElementsTreeOutline, we subclass .expandRecursively() to first call DOMAgent's new .getSubtree() method and then call the default implementation when all nodes have been retrieved from the backend. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. Tests: inspector-protocol/dom-request-child-nodes-depth.html inspector/elements/expand-recursively.html * inspector/Inspector.json: Add the new `depth` parameter to DOM.requestChildNodes(). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::pushChildNodesToFrontend): Add a new optional `depth` parameter which defaults to 1. (WebCore::InspectorDOMAgent::requestChildNodes): Add a new optional `depth` parameter which defaults to 1 and allows -1 as an unbound value. * inspector/InspectorDOMAgent.h: (InspectorDOMAgent): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.): (WebInspector.DOMNode.prototype.getSubtree): New method allowing to specify at what depth we want to retrieve children of a given node from the backend. * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeElement.prototype.expandRecursively): Override default implementation to first obtain the deepest subtree for the current node so that deep expansion happens as expected. LayoutTests: Adding a new protocol test that covers the new `depth` parameter for the requestChildNodes method and a new front-end method that tests correct behavior of the expandRecursively() method. Patch by Antoine Quint <graouts@apple.com> on 2013-01-11 Reviewed by Pavel Feldman. * inspector-protocol/dom-request-child-nodes-depth-expected.txt: Added. * inspector-protocol/dom-request-child-nodes-depth.html: Added. * inspector/elements/expand-recursively-expected.txt: Added. * inspector/elements/expand-recursively.html: Added. Canonical link: https://commits.webkit.org/124853@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-01-11 12:28:24 +00:00
runTest();
}, false);
</script>
</head>
<body>
<div id="depth-1">
<div id="depth-2">
<div id="depth-3">
<div id="depth-4">
<div id="depth-5">
<div id="depth-6">
<div id="depth-7">
<div id="depth-8">
<div id="depth-9">
<div id="depth-10">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>