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

Unified Diff: tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py

Issue 1135173007: Kill page_test.NavigateToPage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@KillNavigateToPage
Patch Set: Address sclittle's comment Created 5 years, 7 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: tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py
diff --git a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py
index ef3dfbb3c417b2de8f909d7330046758d02e5038..219b65a0e13f5e681673c7a021bf7694d96322e5 100644
--- a/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py
+++ b/tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py
@@ -1,7 +1,9 @@
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import logging
+from telemetry.core import exceptions
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
@@ -13,20 +15,28 @@ class SafebrowsingPage(page_module.Page):
response will be received.
"""
- def __init__(self, url, page_set):
+ def __init__(self, url, page_set, expect_timeout):
super(SafebrowsingPage, self).__init__(url=url, page_set=page_set)
self.archive_data_file = '../data/chrome_proxy_safebrowsing.json'
+ self._expect_timeout = expect_timeout
def RunNavigateSteps(self, action_runner):
- action_runner.Navigate(self.url, timeout_in_seconds=5)
+ try:
+ action_runner.Navigate(self.url, timeout_in_seconds=5)
+ except exceptions.TimeoutException as e:
+ if self._expect_timeout:
+ logging.warning('Navigation timeout on page %s', self.url)
+ else:
+ raise e
class SafebrowsingPageSet(page_set_module.PageSet):
""" Chrome proxy test sites """
- def __init__(self):
+ def __init__(self, expect_timeout=False):
super(SafebrowsingPageSet, self).__init__(
archive_data_file='../data/chrome_proxy_safebrowsing.json')
- self.AddUserStory(SafebrowsingPage('http://www.ianfette.org/', self))
+ self.AddUserStory(
+ SafebrowsingPage('http://www.ianfette.org/', self, expect_timeout))
« no previous file with comments | « tools/chrome_proxy/integration_tests/chrome_proxy_measurements.py ('k') | tools/telemetry/telemetry/page/page_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698