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

Unified Diff: tools/telemetry/telemetry/inspector_page.py

Issue 11419320: [Telemetry] Port page cycler to Telemetry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tabs Created 8 years 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
« no previous file with comments | « tools/perf/perf_tools/page_cycler.py ('k') | tools/telemetry/telemetry/inspector_page_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/inspector_page.py
diff --git a/tools/telemetry/telemetry/inspector_page.py b/tools/telemetry/telemetry/inspector_page.py
index 58afb4e8f4bb22337b0575740fde772de0617905..3f9701ce413a2696d5df04b5ac7da3c0b215fdd0 100644
--- a/tools/telemetry/telemetry/inspector_page.py
+++ b/tools/telemetry/telemetry/inspector_page.py
@@ -138,3 +138,15 @@ class InspectorPage(object):
if snap:
return png_bitmap.PngBitmap(snap['data'])
return None
+
+ def GetCookieByName(self, name, timeout=60):
+ """Returns the value of the cookie by the given |name|."""
+ request = {
+ 'method': 'Page.getCookies'
+ }
+ res = self._inspector_backend.SyncRequest(request, timeout)
+ cookies = res['result']['cookies']
+ for cookie in cookies:
+ if cookie['name'] == name:
+ return cookie['value']
+ return None
« no previous file with comments | « tools/perf/perf_tools/page_cycler.py ('k') | tools/telemetry/telemetry/inspector_page_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698