3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
7 function testFunction()
14 InspectorTest
.runDebuggerTestSuite([
15 function testCallStackPlacardsDiscarded(next
)
17 InspectorTest
.debuggerModel
.addEventListener(WebInspector
.DebuggerModel
.Events
.DebuggerPaused
, didPause
, this);
18 var previousCount
= undefined;
19 function didPause(event
)
21 InspectorTest
.addResult("Received DebuggerPaused event.");
22 var callFrame
= event
.data
.callFrames
[0];
23 InspectorTest
.addResult("Function name: " + callFrame
.functionName
);
24 var count
= liveLocationsCount();
25 if (previousCount
!== undefined && count
!== previousCount
)
26 InspectorTest
.addResult("FAILED: Live locations count has changed!");
27 previousCount
= count
;
30 InspectorTest
.showScriptSource("callstack-placards-discarded.html", didShowScriptSource
);
31 function didShowScriptSource(sourceFrame
)
33 InspectorTest
.addResult("Script source was shown.");
34 InspectorTest
.runTestFunctionAndWaitUntilPaused(didPause1
);
38 InspectorTest
.resumeExecution(didResume1
)
42 InspectorTest
.runTestFunctionAndWaitUntilPaused(didPause2
);
46 InspectorTest
.resumeExecution(didResume2
)
55 function liveLocationsCount()
58 var infos
= WebInspector
.debuggerWorkspaceBinding
._targetToData
.get(InspectorTest
.debuggerModel
.target()).scriptDataMap
.valuesArray();
59 infos
.forEach(function(info
) {
60 count
+= info
._locations
.size
;
69 <body onload=
"runTest()">
71 Tests that RawSourceCode listeners count won't grow on each script pause.
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=70996">Bug
70996</a>