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

Unified Diff: tools/chrome_proxy/webdriver/common.py

Issue 2852533002: Add lite page BTF test (Closed)
Patch Set: Grammer nit Created 3 years, 8 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
« no previous file with comments | « no previous file | tools/chrome_proxy/webdriver/lite_page.py » ('j') | tools/chrome_proxy/webdriver/lite_page.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/chrome_proxy/webdriver/common.py
diff --git a/tools/chrome_proxy/webdriver/common.py b/tools/chrome_proxy/webdriver/common.py
index f17ab3b2a60bb7d0c0b6174bc40e645b0f04fc72..d12b17049f22071de7850d58beafceb9949ff3ba 100644
--- a/tools/chrome_proxy/webdriver/common.py
+++ b/tools/chrome_proxy/webdriver/common.py
@@ -414,7 +414,8 @@ class TestDriver:
return bool(histogram)
- def GetHTTPResponses(self, include_favicon=False, skip_domainless_pages=True):
+ def GetHTTPResponses(self, include_favicon=False, skip_domainless_pages=True,
+ override_has_logs=False):
"""Parses the Performance Logs and returns a list of HTTPResponse objects.
Use caution when calling this function multiple times. Only responses
@@ -426,10 +427,14 @@ class TestDriver:
include_favicon: A bool that if True will include responses for favicons.
skip_domainless_pages: If True, only responses with a net_loc as in RFC
1808 will be included. Pages such as about:blank will be skipped.
+ override_has_logs: Allows the _has_logs property to be set if there was
+ not a page load but an XHR was expected instead.
Returns:
A list of HTTPResponse objects, each representing a single completed HTTP
transaction by Chrome.
"""
+ if override_has_logs:
+ self._has_logs = True
def MakeHTTPResponse(log_dict):
params = log_dict['params']
response_dict = params['response']
« no previous file with comments | « no previous file | tools/chrome_proxy/webdriver/lite_page.py » ('j') | tools/chrome_proxy/webdriver/lite_page.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698