blob: 2b2fa138899b27e50229041815c8fa6e04552ead [file] [log] [blame]
<html>
<head>
<script src="../../http/tests/inspector/inspector-test.js"></script>
<script src="../../http/tests/inspector/debugger-test.js"></script>
<script src="../../http/tests/inspector/elements-test.js"></script>
<script>
function testFunction()
{
return testFunction2();
}
function testFunction2()
{
var x = Math.sqrt(10);
debugger;
return x;
}
var test = function()
{
InspectorTest.startDebuggerTest(step1);
var panel = WebInspector.panels.scripts;
var sourceFrame;
function step1()
{
var testName = WebInspector.inspectedPageURL;
testName = testName.substring(testName.lastIndexOf('/') + 1);
InspectorTest.showScriptSource(testName, step2);
}
function step2(frame)
{
sourceFrame = frame;
InspectorTest.runTestFunctionAndWaitUntilPaused(step3);
}
function step3()
{
InspectorTest.completeDebuggerTest(); return;
WebInspector.debuggerModel.setSelectedCallFrame(WebInspector.debuggerModel.debuggerPausedDetails().callFrames[1]);
sourceFrame._toggleFormatSource(step4);
}
function step4()
{
InspectorTest.assertEquals("testFunction", WebInspector.debuggerModel.selectedCallFrame().functionName);
sourceFrame._toggleFormatSource(step5);
}
function step5()
{
InspectorTest.completeDebuggerTest();
}
}
</script>
</head>
<body onload="runTest()">
<p>Tests selected call frame does not change when pretty-print is toggled.</p>
<a href="https://bugs.webkit.org/show_bug.cgi?id=70906">Bug 70906</a>
</body>
</html>