Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: LayoutTests/inspector/sources/debugger/debugger-eval-on-call-frame-inside-iframe.html

Issue 644403003: DevTools: Fix __commandLineAPI is not defined error and remove the with- hack for eval on call fram… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698