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/elements-test.js"></script> | 4 <script src="../../../http/tests/inspector/elements-test.js"></script> |
5 <script src="../styles/styles-test.js"></script> | 5 <script src="../styles/styles-test.js"></script> |
6 <style> | 6 <style> |
7 #first { | 7 #first { |
8 color: blue; | 8 color: blue; |
9 } | 9 } |
10 | 10 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 else | 58 else |
59 InspectorTest.addResult("SUCCESS: LiveLocations count do not gro
w."); | 59 InspectorTest.addResult("SUCCESS: LiveLocations count do not gro
w."); |
60 next(); | 60 next(); |
61 } | 61 } |
62 ]); | 62 ]); |
63 | 63 |
64 function countLiveLocations() | 64 function countLiveLocations() |
65 { | 65 { |
66 var locationsCount = 0; | 66 var locationsCount = 0; |
67 var targetInfos = WebInspector.cssWorkspaceBinding._modelToTargetInfo.va
luesArray(); | 67 var targetInfos = WebInspector.cssWorkspaceBinding._modelToTargetInfo.va
luesArray(); |
68 for (var targetInfo of targetInfos) { | 68 for (var targetInfo of targetInfos) |
69 var headerInfos = targetInfo._headerInfoById.valuesArray(); | 69 locationsCount += targetInfo._locations.valuesArray().length; |
70 for (var headerInfo of headerInfos) | |
71 locationsCount += headerInfo._locations.size; | |
72 } | |
73 return locationsCount; | 70 return locationsCount; |
74 } | 71 } |
75 } | 72 } |
76 | 73 |
77 </script> | 74 </script> |
78 | 75 |
79 </head> | 76 </head> |
80 | 77 |
81 <body onload="runTest()"> | 78 <body onload="runTest()"> |
82 | 79 |
83 <p> | 80 <p> |
84 Tests that styles sidebar pane does not leak any LiveLocations. | 81 Tests that styles sidebar pane does not leak any LiveLocations. |
85 </p> | 82 </p> |
86 <div id="first">First element to select</div> | 83 <div id="first">First element to select</div> |
87 <div id="second">Second element to select</div> | 84 <div id="second">Second element to select</div> |
88 <div id="third">Second element to select</div> | 85 <div id="third">Second element to select</div> |
89 </body> | 86 </body> |
90 </html> | 87 </html> |
OLD | NEW |