| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/debugger-test.js"></script> |
| <script> |
| |
| function testFunction() |
| { |
| debugger; |
| } |
| |
| var test = function() |
| { |
| InspectorTest.runDebuggerTestSuite([ |
| function testCallStackPlacardsDiscarded(next) |
| { |
| WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.DebuggerPaused, didPause, this); |
| var previousCount = undefined; |
| function didPause(event) |
| { |
| InspectorTest.addResult("Received DebuggerPaused event."); |
| var callFrame = event.data.callFrames[0]; |
| InspectorTest.addResult("Function name: " + callFrame.functionName); |
| var count = liveLocationsCount(); |
| if (previousCount !== undefined && count !== previousCount) |
| InspectorTest.addResult("FAILED: Live locations count has changed!"); |
| previousCount = count; |
| } |
| |
| InspectorTest.showScriptSource("callstack-placards-discarded.html", didShowScriptSource); |
| function didShowScriptSource(sourceFrame) |
| { |
| InspectorTest.addResult("Script source was shown."); |
| InspectorTest.runTestFunctionAndWaitUntilPaused(didPause1); |
| } |
| function didPause1() |
| { |
| InspectorTest.resumeExecution(didResume1) |
| } |
| function didResume1() |
| { |
| InspectorTest.runTestFunctionAndWaitUntilPaused(didPause2); |
| } |
| function didPause2() |
| { |
| InspectorTest.resumeExecution(didResume2) |
| } |
| function didResume2() |
| { |
| next(); |
| } |
| }, |
| ]); |
| |
| function liveLocationsCount() |
| { |
| var count = 0; |
| var scripts = WebInspector.debuggerModel.scripts; |
| for (var id in scripts) |
| count += scripts[id]._locations.size(); |
| return count; |
| } |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| 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> |
| </p> |
| |
| </body> |
| </html> |