| Index: LayoutTests/inspector/sources/debugger/debugger-eval-on-call-frame-inside-iframe.html
|
| diff --git a/LayoutTests/inspector/sources/debugger/debugger-eval-on-call-frame-inside-iframe.html b/LayoutTests/inspector/sources/debugger/debugger-eval-on-call-frame-inside-iframe.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..96ed86d377e2b55241c8bd1e6fc1cb39effaed17
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/sources/debugger/debugger-eval-on-call-frame-inside-iframe.html
|
| @@ -0,0 +1,105 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../../http/tests/inspector/console-test.js"></script>
|
| +<script src="../../../http/tests/inspector/debugger-test.js"></script>
|
| +<script>
|
| +
|
| +function dirxml() { return "overridden dirxml() in top frame"; }
|
| +
|
| +function onload()
|
| +{
|
| + var iframe = document.getElementById("iframe");
|
| + var doc = iframe.contentWindow.document;
|
| +
|
| + var html = "<html><head><script>\n" +
|
| + "function dir() { return 'overridden dir() in iframe'; }\n" +
|
| + "function pauseInsideIframe()\n" +
|
| + "{\n" +
|
| + " var table = 'local in iframe';\n" +
|
| + " debugger;\n" +
|
| + "}\n" +
|
| + "</" + "script></" + "head><" + "body></" + "body></" + "html>";
|
| + doc.open();
|
| + doc.write(html);
|
| + doc.close();
|
| +
|
| + runTest();
|
| +}
|
| +
|
| +function testFunction()
|
| +{
|
| + var clear = "local in top frame";
|
| + var iframe = document.getElementById("iframe");
|
| + iframe.contentWindow.pauseInsideIframe.call({foo: 42});
|
| +}
|
| +
|
| +var test = function()
|
| +{
|
| + var expressions = [
|
| + "dir()",
|
| + "dirxml()",
|
| + "table",
|
| + "clear",
|
| + "x:", // print correct syntax error: crbug.com/110163
|
| + ];
|
| +
|
| + function evaluateInConsoleAndDump(callback)
|
| + {
|
| + var copy = expressions.slice();
|
| + inner();
|
| +
|
| + function inner()
|
| + {
|
| + var expression = copy.shift();
|
| + if (expression)
|
| + InspectorTest.evaluateInConsoleAndDump(expression, inner);
|
| + else
|
| + callback();
|
| + }
|
| + }
|
| +
|
| + InspectorTest.startDebuggerTest(step1, true);
|
| +
|
| + function step1()
|
| + {
|
| + InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
|
| + }
|
| +
|
| + function step2(callFrames)
|
| + {
|
| + InspectorTest.captureStackTrace(callFrames);
|
| + InspectorTest.addResult("\n=== Evaluating on iframe ===");
|
| + evaluateInConsoleAndDump(step3);
|
| + }
|
| +
|
| + function step3()
|
| + {
|
| + var pane = WebInspector.panels.sources.sidebarPanes.callstack;
|
| + pane._placardSelected(pane.placards[1]);
|
| + InspectorTest.runAfterPendingDispatches(step4);
|
| + }
|
| +
|
| + function step4()
|
| + {
|
| + InspectorTest.addResult("\n=== Evaluating on top frame ===");
|
| + evaluateInConsoleAndDump(step5);
|
| + }
|
| +
|
| + function step5()
|
| + {
|
| + InspectorTest.completeDebuggerTest();
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="onload()">
|
| +<iframe id="iframe"></iframe>
|
| +<p>
|
| +Test that evaluation on call frame works across all inspected windows in the call stack.
|
| +</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|