4 document
.writeln("<script>\nfunction f1() {\n window.foo = true;\n}\nf1();\n <" + "/script>");
8 console
.assert(window
.foo
, "FAIL");
11 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
12 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
18 var numberOfStepInto
= 9;
20 InspectorTest
.startDebuggerTest(step1
, true);
24 InspectorTest
.showScriptSource("debugger-step-into-document-write.html", step2
);
27 function step2(sourceFrame
)
29 InspectorTest
.addResult("Script source was shown.");
30 InspectorTest
.setBreakpoint(sourceFrame
, 3, "", true);
31 InspectorTest
.waitUntilPaused(step3
);
32 InspectorTest
.reloadPage(completeTest
);
37 var actions
= ["Print"]; // First pause on breakpoint.
38 for (var i
= 0; i
< numberOfStepInto
; ++i
)
39 actions
.push("StepInto", "Print");
40 actions
.push("Resume");
41 InspectorTest
.waitUntilPausedAndPerformSteppingActions(actions
);
44 function completeTest()
46 InspectorTest
.completeDebuggerTest();
53 <body onload=
"runTest()">
55 Tests that debugger StepInto will step into inlined scripts created by document.write().