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

Unified Diff: tools/telemetry/telemetry/core/web_contents.py

Issue 952693003: Telemetry: Move TimeoutException from util module to exceptions module. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « tools/telemetry/telemetry/core/util_unittest.py ('k') | tools/telemetry/telemetry/core/webpagereplay.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/web_contents.py
diff --git a/tools/telemetry/telemetry/core/web_contents.py b/tools/telemetry/telemetry/core/web_contents.py
index ae8f1cfcfcad8e04f8ae8956ead8d85dabba6a88..38232360166d694a916daa9744b5017bc5b9b958 100644
--- a/tools/telemetry/telemetry/core/web_contents.py
+++ b/tools/telemetry/telemetry/core/web_contents.py
@@ -4,6 +4,7 @@
import os
+from telemetry.core import exceptions
from telemetry.core import util
DEFAULT_WEB_CONTENTS_TIMEOUT = 90
@@ -43,16 +44,16 @@ class WebContents(object):
def IsJavaScriptExpressionTrue():
try:
return bool(self.EvaluateJavaScript(expr))
- except util.TimeoutException:
+ except exceptions.TimeoutException:
# If the main thread is busy for longer than Evaluate's timeout, we
# may time out here early. Instead, we want to wait for the full
# timeout of this method.
return False
try:
util.WaitFor(IsJavaScriptExpressionTrue, timeout)
- except util.TimeoutException as e:
+ except exceptions.TimeoutException as e:
# Try to make timeouts a little more actionable by dumping |this|.
- raise util.TimeoutException(e.message + self.EvaluateJavaScript("""
+ raise exceptions.TimeoutException(e.message + self.EvaluateJavaScript("""
(function() {
var error = '\\n\\nJavaScript |this|:\\n';
for (name in this) {
« no previous file with comments | « tools/telemetry/telemetry/core/util_unittest.py ('k') | tools/telemetry/telemetry/core/webpagereplay.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698