| 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>
|
|
|