OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function testFunction() | 7 function testFunction() |
8 { | 8 { |
9 debugger; | 9 debugger; |
10 } | 10 } |
11 | 11 |
12 var test = function() | 12 var test = function() |
13 { | 13 { |
14 InspectorTest.runDebuggerTestSuite([ | 14 InspectorTest.runDebuggerTestSuite([ |
15 function testCallStackPlacardsDiscarded(next) | 15 function testCallStackPlacardsDiscarded(next) |
16 { | 16 { |
17 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerMod
el.Events.DebuggerPaused, didPause, this); | 17 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerMo
del.Events.DebuggerPaused, didPause, this); |
18 var previousCount = undefined; | 18 var previousCount = undefined; |
19 function didPause(event) | 19 function didPause(event) |
20 { | 20 { |
21 InspectorTest.addResult("Received DebuggerPaused event."); | 21 InspectorTest.addResult("Received DebuggerPaused event."); |
22 var callFrame = event.data.callFrames[0]; | 22 var callFrame = event.data.callFrames[0]; |
23 InspectorTest.addResult("Function name: " + callFrame.functionNa
me); | 23 InspectorTest.addResult("Function name: " + callFrame.functionNa
me); |
24 var count = liveLocationsCount(); | 24 var count = liveLocationsCount(); |
25 if (previousCount !== undefined && count !== previousCount) | 25 if (previousCount !== undefined && count !== previousCount) |
26 InspectorTest.addResult("FAILED: Live locations count has ch
anged!"); | 26 InspectorTest.addResult("FAILED: Live locations count has ch
anged!"); |
27 previousCount = count; | 27 previousCount = count; |
(...skipping 20 matching lines...) Expand all Loading... |
48 function didResume2() | 48 function didResume2() |
49 { | 49 { |
50 next(); | 50 next(); |
51 } | 51 } |
52 }, | 52 }, |
53 ]); | 53 ]); |
54 | 54 |
55 function liveLocationsCount() | 55 function liveLocationsCount() |
56 { | 56 { |
57 var count = 0; | 57 var count = 0; |
58 var infos = WebInspector.debuggerWorkspaceBinding._targetToData.get(WebI
nspector.debuggerModel.target()).scriptDataMap.valuesArray(); | 58 var infos = WebInspector.debuggerWorkspaceBinding._targetToData.get(Insp
ectorTest.debuggerModel.target()).scriptDataMap.valuesArray(); |
59 infos.forEach(function(info) { | 59 infos.forEach(function(info) { |
60 count += info._locations.size; | 60 count += info._locations.size; |
61 }); | 61 }); |
62 return count; | 62 return count; |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 </script> | 66 </script> |
67 </head> | 67 </head> |
68 | 68 |
69 <body onload="runTest()"> | 69 <body onload="runTest()"> |
70 <p> | 70 <p> |
71 Tests that RawSourceCode listeners count won't grow on each script pause. <a hre
f="https://bugs.webkit.org/show_bug.cgi?id=70996">Bug 70996</a> | 71 Tests that RawSourceCode listeners count won't grow on each script pause. <a hre
f="https://bugs.webkit.org/show_bug.cgi?id=70996">Bug 70996</a> |
72 </p> | 72 </p> |
73 | 73 |
74 </body> | 74 </body> |
75 </html> | 75 </html> |
OLD | NEW |