Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6175)

Unified Diff: chrome/test/pyautolib/remote_inspector_client.py

Issue 11054014: Add a test for checking objects reported by DevTools memory instrumentation not allocated by tcmall… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/pyautolib/remote_inspector_client.py
diff --git a/chrome/test/pyautolib/remote_inspector_client.py b/chrome/test/pyautolib/remote_inspector_client.py
index bda06c7ebef254b27e3e005115144c35ccc99e88..bcbac8f01f5a5408fd8a838032e6f358ff151d37 100755
--- a/chrome/test/pyautolib/remote_inspector_client.py
+++ b/chrome/test/pyautolib/remote_inspector_client.py
@@ -726,6 +726,20 @@ class NativeMemorySnapshot(object):
known_size += child['size']
return self.GetProcessPrivateMemorySize() - known_size
+ def GetInstrumentedObjectsCount(self):
dennis_jeffrey 2012/10/04 01:16:33 add a docstring and mention what is returned if th
yurys 2012/10/04 15:07:47 Done.
+ memory_block = self.FindMemoryBlock(['ProcessPrivateMemory',
+ 'InstrumentedObjectsCount'])
+ if not memory_block is None:
+ return memory_block['size']
+ return -1
dennis_jeffrey 2012/10/04 01:16:33 would returning None be preferable to a -1? That
yurys 2012/10/04 15:07:47 Good idea, fixed!
+
+ def GetNumberOfInstrumentedObjectsNotInHeap(self):
dennis_jeffrey 2012/10/04 01:16:33 add a docstring and mention what is returned if th
yurys 2012/10/04 15:07:47 Done.
+ memory_block = self.FindMemoryBlock(['ProcessPrivateMemory',
+ 'InstrumentedButNotAllocatedObjectsCount'])
+ if not memory_block is None:
+ return memory_block['size']
+ return -1
dennis_jeffrey 2012/10/04 01:16:33 same comment as line 734 above
yurys 2012/10/04 15:07:47 Done.
+
def FindMemoryBlock(self, path):
"""Find memory block with given path.
« chrome/test/functional/devtools_test_base.py ('K') | « chrome/test/functional/devtools_test_base.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698