|
19 | 19 | description: "Should not be able to access $0 node in different domain subframe from the main frame.",
|
20 | 20 | test(resolve, reject) {
|
21 | 21 | InspectorTest.log("Setting $0 to node within subframe.");
|
22 |
| - ConsoleAgent.addInspectedNode(nodeInSubFrameId); |
| 22 | + DOMAgent.setInspectedNode(nodeInSubFrameId); |
23 | 23 | RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true}, (error, remoteObjectPayload, wasThrown) => {
|
24 | 24 | InspectorTest.assert(!error, "Should not be a protocol error.");
|
25 | 25 | InspectorTest.assert(!wasThrown, "Should not be an exception.");
|
|
35 | 35 | description: "Should be able to access $0 node in the same frame.",
|
36 | 36 | test(resolve, reject) {
|
37 | 37 | InspectorTest.log("Setting $0 to node within the main frame.");
|
38 |
| - ConsoleAgent.addInspectedNode(nodeInMainFrameId); |
| 38 | + DOMAgent.setInspectedNode(nodeInMainFrameId); |
39 | 39 | RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true}, (error, remoteObjectPayload, wasThrown) => {
|
40 | 40 | InspectorTest.assert(!error, "Should not be a protocol error.");
|
41 | 41 | InspectorTest.assert(!wasThrown, "Should not be an exception.");
|
|
51 | 51 | description: "Should not be able to access $0 node in different domain main frame from the subframe.",
|
52 | 52 | test(resolve, reject) {
|
53 | 53 | InspectorTest.log("Setting $0 to node within the main frame.");
|
54 |
| - ConsoleAgent.addInspectedNode(nodeInMainFrameId); |
| 54 | + DOMAgent.setInspectedNode(nodeInMainFrameId); |
55 | 55 | RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true, contextId: childFrames[0].pageExecutionContext.id}, (error, remoteObjectPayload, wasThrown) => {
|
56 | 56 | InspectorTest.assert(!error, "Should not be a protocol error.");
|
57 | 57 | InspectorTest.assert(!wasThrown, "Should not be an exception.");
|
|
67 | 67 | description: "Should be able to access $0 node in the same frame.",
|
68 | 68 | test(resolve, reject) {
|
69 | 69 | InspectorTest.log("Setting $0 to node within the subframe.");
|
70 |
| - ConsoleAgent.addInspectedNode(nodeInSubFrameId); |
| 70 | + DOMAgent.setInspectedNode(nodeInSubFrameId); |
71 | 71 | RuntimeAgent.evaluate.invoke({expression: "$0", includeCommandLineAPI: true, contextId: childFrames[0].pageExecutionContext.id}, (error, remoteObjectPayload, wasThrown) => {
|
72 | 72 | InspectorTest.assert(!error, "Should not be a protocol error.");
|
73 | 73 | InspectorTest.assert(!wasThrown, "Should not be an exception.");
|
|
0 commit comments