3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/console-test.js"></script>
5 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
8 function dirxml() { return "overridden dirxml() in top frame"; }
12 var iframe
= document
.getElementById("iframe");
13 var doc
= iframe
.contentWindow
.document
;
15 var html
= "<html><head><script>\n" +
16 "function dir() { return 'overridden dir() in iframe'; }\n" +
17 "function pauseInsideIframe()\n" +
19 " var table = 'local in iframe';\n" +
22 "</" + "script></" + "head><" + "body></" + "body></" + "html>";
30 function testFunction()
32 var clear
= "local in top frame";
33 var iframe
= document
.getElementById("iframe");
34 iframe
.contentWindow
.pauseInsideIframe
.call({foo
: 42});
44 "x:", // print correct syntax error: crbug.com/110163
47 function evaluateInConsoleAndDump(callback
)
49 var copy
= expressions
.slice();
54 var expression
= copy
.shift();
56 InspectorTest
.evaluateInConsoleAndDump(expression
, inner
);
62 InspectorTest
.startDebuggerTest(step1
, true);
66 InspectorTest
.runTestFunctionAndWaitUntilPaused(step2
);
69 function step2(callFrames
)
71 InspectorTest
.captureStackTrace(callFrames
);
72 InspectorTest
.addResult("\n=== Evaluating on iframe ===");
73 evaluateInConsoleAndDump(step3
);
78 var pane
= WebInspector
.panels
.sources
.sidebarPanes
.callstack
;
79 pane
._callFrameSelected(pane
.callFrames
[1]);
80 InspectorTest
.runAfterPendingDispatches(step4
);
85 InspectorTest
.addResult("\n=== Evaluating on top frame ===");
86 evaluateInConsoleAndDump(step5
);
91 InspectorTest
.completeDebuggerTest();
98 <body onload=
"onload()">
99 <iframe id=
"iframe"></iframe>
101 Test that evaluation on call frame works across all inspected windows in the call stack.