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

Unified Diff: LayoutTests/inspector/sources/debugger/debugger-step-into-document-write.html

Issue 732593002: DevTools: Make StepInto work across script boundaries and Blink process tasks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 1 month 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-step-into-document-write.html
diff --git a/LayoutTests/inspector/sources/debugger/debugger-step-into-document-write.html b/LayoutTests/inspector/sources/debugger/debugger-step-into-document-write.html
new file mode 100644
index 0000000000000000000000000000000000000000..7d8d6b74bb870b7e248d9cd35adf31f6790a9f36
--- /dev/null
+++ b/LayoutTests/inspector/sources/debugger/debugger-step-into-document-write.html
@@ -0,0 +1,58 @@
+<html>
+<head>
+<script>
+ document.writeln("<script>\nfunction f1() {\n window.foo = true;\n}\nf1();\n <" + "/script>");
+</script>
+
+<script>
+ console.assert(window.foo, "FAIL");
+</script>
+
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/debugger-test.js"></script>
+
+<script>
+
+function test()
+{
+ var numberOfStepInto = 9;
+
+ InspectorTest.startDebuggerTest(step1, true);
+
+ function step1()
+ {
+ InspectorTest.showScriptSource("debugger-step-into-document-write.html", step2);
+ }
+
+ function step2(sourceFrame)
+ {
+ InspectorTest.addResult("Script source was shown.");
+ InspectorTest.setBreakpoint(sourceFrame, 3, "", true);
+ InspectorTest.waitUntilPaused(step3);
+ InspectorTest.reloadPage(completeTest);
+ }
+
+ function step3()
+ {
+ var actions = ["Print"]; // First pause on breakpoint.
+ for (var i = 0; i < numberOfStepInto; ++i)
+ actions.push("StepInto", "Print");
+ actions.push("Resume");
+ InspectorTest.waitUntilPausedAndPerformSteppingActions(actions);
+ }
+
+ function completeTest()
+ {
+ InspectorTest.completeDebuggerTest();
+ }
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that debugger StepInto will step into inlined scripts created by document.write().
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698