3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="resources/script1.js"></script>
6 <script src="resources/script2.js"></script>
10 InspectorTest.runDebuggerTestSuite([
11 function testSourceFramesCount(next)
13 var panel = WebInspector.panels.sources;
14 var sourceFrameCount = 0;
16 InspectorTest.showScriptSource("script1.js", didShowScriptSources);
18 function didShowScriptSources()
20 InspectorTest.reloadPage(didReload);
25 InspectorTest.showScriptSource("script2.js", didShowScriptSourceAgain);
28 function didShowScriptSourceAgain()
30 var listeners = WebInspector.breakpointManager._listeners.get("breakpoint-added");
31 // There should be 3 breakpoint-added event listeners:
32 // - BreakpointsSidebarPane
34 InspectorTest.addResult("Number of breakpoint-added event listeners is " + listeners.length);
36 function dumpListener(listener)
38 if (!(listener.thisObject instanceof WebInspector.SourceFrame))
40 var sourceFrame = listener.thisObject;
41 InspectorTest.addResult(" " + sourceFrame._uiSourceCode.name());
44 InspectorTest.addResult("Dumping SourceFrames listening for breakpoint-added event:");
45 listeners.map(dumpListener);
54 <body onload="runTest()">
55 <p>Tests that scripts panel does not create too many source frames.</p>