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

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

Issue 10702200: PyAuto test for GPU memory consumption (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index 53d86ca6deccec640e6509ae856df418e1016e8d..0790bcf9dabf7e3de8e84c1a3a0dcb4424cf7844 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -3830,6 +3830,26 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
}
return self._GetResultFromJSONRequest(cmd_dict, windex=windex)
+ def GetGpuMemStats(self, windex=0):
+ """Returns the current FPS associated with the renderer process for a tab.
+
+ FPS is the rendered frames per second.
+
+ Args:
+ window_index: The window index, default is 0.
+
+ Returns:
+ A dictionary containing GPU memory usage info.
+ Example:
+ { 'gpu_active': true,
+ 'gpu_memory_bytes_total': 1073741824,
+ 'gpu_memory_bytes_used': 16777216 }
+ """
+ cmd_dict = { # Prepare command for the json interface.
+ 'command': 'GetGpuMemStats',
+ }
+ return self._GetResultFromJSONRequest(cmd_dict, windex=windex)
+
def IsFullscreenForBrowser(self, windex=0):
"""Returns true if the window is currently fullscreen and was initially
transitioned to fullscreen by a browser (vs tab) mode transition."""

Powered by Google App Engine
This is Rietveld 408576698