Skip to content

Commit ea69cfa

Browse files
Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
https://bugs.webkit.org/show_bug.cgi?id=176827 Reviewed by Joseph Pecoraro. Source/JavaScriptCore: * inspector/agents/InspectorConsoleAgent.h: * inspector/agents/JSGlobalObjectConsoleAgent.h: * inspector/agents/JSGlobalObjectConsoleAgent.cpp: (Inspector::JSGlobalObjectConsoleAgent::addInspectedNode): Deleted. * inspector/protocol/Console.json: * inspector/protocol/DOM.json: Source/WebCore: Tests: http/tests/inspector/dom/cross-domain-inspected-node-access.html inspector/dom/setInspectedNode.html * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setInspectedNode): * inspector/PageConsoleAgent.h: * inspector/PageConsoleAgent.cpp: (WebCore::PageConsoleAgent::addInspectedNode): Deleted. * inspector/WorkerConsoleAgent.h: * inspector/WorkerConsoleAgent.cpp: (WebCore::WorkerConsoleAgent::addInspectedNode): Deleted. Source/WebInspectorUI: * UserInterface/Controllers/DOMTreeManager.js: (WI.DOMTreeManager): (WI.DOMTreeManager.prototype.setInspectedNode): * UserInterface/Views/DOMTreeContentView.js: (WI.DOMTreeContentView.prototype._selectedNodeDidChange): LayoutTests: * http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt: Renamed from LayoutTests/http/tests/inspector/console/cross-domain-inspected-node-access-expected.txt. * http/tests/inspector/dom/cross-domain-inspected-node-access.html: Renamed from LayoutTests/http/tests/inspector/console/cross-domain-inspected-node-access.html. * inspector/console/command-line-api.html: * inspector/dom/setInspectedNode-expected.txt: Renamed from LayoutTests/inspector/console/addInspectedNode-expected.txt. * inspector/dom/setInspectedNode.html: Renamed from LayoutTests/inspector/console/addInspectedNode.html. * platform/gtk/TestExpectations: * platform/mac/TestExpectations: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@222486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 557c600 commit ea69cfa

24 files changed

+144
-63
lines changed

LayoutTests/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2017-09-25 Devin Rousso <[email protected]>
2+
3+
Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
4+
https://bugs.webkit.org/show_bug.cgi?id=176827
5+
6+
Reviewed by Joseph Pecoraro.
7+
8+
* http/tests/inspector/dom/cross-domain-inspected-node-access-expected.txt: Renamed from LayoutTests/http/tests/inspector/console/cross-domain-inspected-node-access-expected.txt.
9+
* http/tests/inspector/dom/cross-domain-inspected-node-access.html: Renamed from LayoutTests/http/tests/inspector/console/cross-domain-inspected-node-access.html.
10+
* inspector/console/command-line-api.html:
11+
* inspector/dom/setInspectedNode-expected.txt: Renamed from LayoutTests/inspector/console/addInspectedNode-expected.txt.
12+
* inspector/dom/setInspectedNode.html: Renamed from LayoutTests/inspector/console/addInspectedNode.html.
13+
* platform/gtk/TestExpectations:
14+
* platform/mac/TestExpectations:
15+
116
2017-09-25 Devin Rousso <[email protected]>
217

318
Web Inspector: Add autocompletion suggestions for CSS attr based on the selected element's attributes

LayoutTests/http/tests/inspector/console/cross-domain-inspected-node-access.html renamed to LayoutTests/http/tests/inspector/dom/cross-domain-inspected-node-access.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
description: "Should not be able to access $0 node in different domain subframe from the main frame.",
2020
test(resolve, reject) {
2121
InspectorTest.log("Setting $0 to node within subframe.");
22-
ConsoleAgent.addInspectedNode(nodeInSubFrameId);
22+
DOMAgent.setInspectedNode(nodeInSubFrameId);
2323
RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true}, (error, remoteObjectPayload, wasThrown) => {
2424
InspectorTest.assert(!error, "Should not be a protocol error.");
2525
InspectorTest.assert(!wasThrown, "Should not be an exception.");
@@ -35,7 +35,7 @@
3535
description: "Should be able to access $0 node in the same frame.",
3636
test(resolve, reject) {
3737
InspectorTest.log("Setting $0 to node within the main frame.");
38-
ConsoleAgent.addInspectedNode(nodeInMainFrameId);
38+
DOMAgent.setInspectedNode(nodeInMainFrameId);
3939
RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true}, (error, remoteObjectPayload, wasThrown) => {
4040
InspectorTest.assert(!error, "Should not be a protocol error.");
4141
InspectorTest.assert(!wasThrown, "Should not be an exception.");
@@ -51,7 +51,7 @@
5151
description: "Should not be able to access $0 node in different domain main frame from the subframe.",
5252
test(resolve, reject) {
5353
InspectorTest.log("Setting $0 to node within the main frame.");
54-
ConsoleAgent.addInspectedNode(nodeInMainFrameId);
54+
DOMAgent.setInspectedNode(nodeInMainFrameId);
5555
RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true, contextId: childFrames[0].pageExecutionContext.id}, (error, remoteObjectPayload, wasThrown) => {
5656
InspectorTest.assert(!error, "Should not be a protocol error.");
5757
InspectorTest.assert(!wasThrown, "Should not be an exception.");
@@ -67,7 +67,7 @@
6767
description: "Should be able to access $0 node in the same frame.",
6868
test(resolve, reject) {
6969
InspectorTest.log("Setting $0 to node within the subframe.");
70-
ConsoleAgent.addInspectedNode(nodeInSubFrameId);
70+
DOMAgent.setInspectedNode(nodeInSubFrameId);
7171
RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true, contextId: childFrames[0].pageExecutionContext.id}, (error, remoteObjectPayload, wasThrown) => {
7272
InspectorTest.assert(!error, "Should not be a protocol error.");
7373
InspectorTest.assert(!wasThrown, "Should not be an exception.");

LayoutTests/inspector/console/command-line-api.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
return reject();
104104
}
105105

106-
ConsoleAgent.addInspectedNode(contentNodeId);
106+
DOMAgent.setInspectedNode(contentNodeId);
107107
resolve();
108108
});
109109
});

LayoutTests/inspector/console/addInspectedNode-expected.txt renamed to LayoutTests/inspector/dom/setInspectedNode-expected.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Test for the Console.addInspectedNode command.
1+
Test for the DOM.setInspectedNode command.
22

33

4-
== Running test suite: Console.addInspectedNode
4+
== Running test suite: DOM.setInspectedNode
55
-- Running test case: Check$0IsUndefined
66
PASS: $0 should be undefined.
77

LayoutTests/inspector/console/addInspectedNode.html renamed to LayoutTests/inspector/dom/setInspectedNode.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
let nodeA, nodeB;
1313

14-
let suite = InspectorTest.createAsyncSuite("Console.addInspectedNode");
14+
let suite = InspectorTest.createAsyncSuite("DOM.setInspectedNode");
1515

1616
suite.addTestCase({
1717
name: "Check$0IsUndefined",
@@ -28,7 +28,7 @@
2828
name: "SetAndCheckNodeA",
2929
description: "Set the inspected node to be Node A and check that $0 is Node A.",
3030
test(resolve, reject) {
31-
ConsoleAgent.addInspectedNode(nodeA.id);
31+
DOMAgent.setInspectedNode(nodeA.id);
3232
evaluate$0((remoteObject) => {
3333
remoteObject.pushNodeToFrontend((nodeId) => {
3434
InspectorTest.expectThat(remoteObject.isNode(), "$0 should be a node.");
@@ -43,7 +43,7 @@
4343
name: "SetBadNodeId",
4444
description: "If an invalid inspected node is set, it should not be bound to $0.",
4545
test(resolve, reject) {
46-
ConsoleAgent.addInspectedNode(999999, (error) => {
46+
DOMAgent.setInspectedNode(999999, (error) => {
4747
InspectorTest.expectThat(error, "Should be an error");
4848
});
4949
evaluate$0((remoteObject) => {
@@ -60,7 +60,7 @@
6060
name: "SetAndCheckNodeB",
6161
description: "Set the inspected node to be Node B and check that $0 is Node B.",
6262
test(resolve, reject) {
63-
ConsoleAgent.addInspectedNode(nodeB.id);
63+
DOMAgent.setInspectedNode(nodeB.id);
6464
evaluate$0((remoteObject) => {
6565
remoteObject.pushNodeToFrontend((nodeId) => {
6666
InspectorTest.expectThat(remoteObject.isNode(), "$0 should be a node.");
@@ -89,7 +89,7 @@
8989
</script>
9090
</head>
9191
<body onload="runTest()">
92-
<p>Test for the Console.addInspectedNode command.</p>
92+
<p>Test for the DOM.setInspectedNode command.</p>
9393
<div style="display:none">
9494
<p id="a">Node A</p>
9595
<p id="b">Node B</p>

LayoutTests/platform/gtk/TestExpectations

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,6 @@ webkit.org/b/149916 http/tests/inspector/dom/disconnect-dom-tree-after-main-fram
20002000
webkit.org/b/149916 inspector/codemirror/prettyprinting-css.html [ Pass Slow ]
20012001
webkit.org/b/149916 inspector/codemirror/prettyprinting-css-rules.html [ Pass Timeout ]
20022002
webkit.org/b/149916 inspector/codemirror/prettyprinting-javascript.html [ Pass Slow ]
2003-
webkit.org/b/149916 inspector/console/addInspectedNode.html [ Pass Slow ]
20042003
webkit.org/b/149916 inspector/console/clearMessages.html [ Pass Slow ]
20052004
webkit.org/b/149916 inspector/console/command-line-api.html [ Pass Slow ]
20062005
webkit.org/b/149916 inspector/console/console-api.html [ Pass Timeout ]
@@ -2021,6 +2020,7 @@ webkit.org/b/149916 inspector/css/stylesheet-events-imports.html [ Pass Slow ]
20212020
webkit.org/b/149916 inspector/css/stylesheet-events-inspector-stylesheet.html [ Pass Slow ]
20222021
webkit.org/b/149916 inspector/css/stylesheet-events-multiple-documents.html [ Pass Slow ]
20232022
webkit.org/b/149916 inspector/css/stylesheet-with-mutations.html [ Pass Slow ]
2023+
webkit.org/b/149916 inspector/dom/setInspectedNode.html [ Pass Slow ]
20242024
webkit.org/b/149916 inspector/heap/garbageCollected.html [ Pass Slow ]
20252025
webkit.org/b/149916 inspector/heap/gc.html [ Pass Slow ]
20262026
webkit.org/b/149916 inspector/network/client-blocked-load.html [ Pass Slow ]
@@ -2086,7 +2086,7 @@ webkit.org/b/116958 http/tests/navigation/scrollstate-after-location-reload.html
20862086

20872087
webkit.org/b/120682 inspector/page/archive.html [ Timeout ]
20882088

2089-
webkit.org/b/122571 http/tests/inspector/console/cross-domain-inspected-node-access.html [ Timeout Pass ]
2089+
webkit.org/b/122571 http/tests/inspector/dom/cross-domain-inspected-node-access.html [ Timeout Pass ]
20902090
webkit.org/b/122571 inspector/debugger/setBreakpoint.html [ Timeout Pass ]
20912091
webkit.org/b/122571 inspector/debugger/call-frame-function-name.html [ Timeout Pass ]
20922092
webkit.org/b/122571 inspector/debugger/setBreakpoint-options-exception.html [ Timeout Pass ]

LayoutTests/platform/mac/TestExpectations

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ webkit.org/b/127116 [ Debug ] svg/custom/animate-initial-pause-unpause.html [ Pa
13781378

13791379
webkit.org/b/161720 [ Debug ] storage/indexeddb/key-type-array.html [ Pass Timeout ]
13801380

1381-
webkit.org/b/155138 [ Debug ] inspector/console/addInspectedNode.html [ Pass Timeout ]
1381+
webkit.org/b/155138 [ Debug ] inspector/dom/setInspectedNode.html [ Pass Timeout ]
13821382

13831383
webkit.org/b/163046 js/regress-141098.html [ Pass Failure ]
13841384

Source/JavaScriptCore/ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
2017-09-25 Devin Rousso <[email protected]>
2+
3+
Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
4+
https://bugs.webkit.org/show_bug.cgi?id=176827
5+
6+
Reviewed by Joseph Pecoraro.
7+
8+
* inspector/agents/InspectorConsoleAgent.h:
9+
10+
* inspector/agents/JSGlobalObjectConsoleAgent.h:
11+
* inspector/agents/JSGlobalObjectConsoleAgent.cpp:
12+
(Inspector::JSGlobalObjectConsoleAgent::addInspectedNode): Deleted.
13+
14+
* inspector/protocol/Console.json:
15+
* inspector/protocol/DOM.json:
16+
117
2017-09-25 Ryan Haddad <[email protected]>
218

319
Unreviewed, rebaseline builtins generator tests after r222473.

Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ class JS_EXPORT_PRIVATE InspectorConsoleAgent : public InspectorAgentBase, publi
6262
void disable(ErrorString&) override;
6363
void clearMessages(ErrorString&) override;
6464
void setMonitoringXHREnabled(ErrorString&, bool enabled) override = 0;
65-
void addInspectedNode(ErrorString&, int nodeId) override = 0;
6665

6766
bool enabled() const { return m_enabled; }
6867
void reset();

0 commit comments

Comments
 (0)