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

Unified Diff: telemetry/telemetry/internal/actions/utils.py

Issue 2138883002: Fix computation of scroll amount in scroll actions. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Address comments Created 4 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
« no previous file with comments | « telemetry/telemetry/internal/actions/tap.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/internal/actions/utils.py
diff --git a/telemetry/telemetry/internal/actions/utils.py b/telemetry/telemetry/internal/actions/utils.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ef59069ab45224d77c33339e2cfa621f0ef7160
--- /dev/null
+++ b/telemetry/telemetry/internal/actions/utils.py
@@ -0,0 +1,11 @@
+# Copyright 2016 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 os
+
+
+def InjectJavaScript(tab, jsFileName):
+ with open(os.path.join(os.path.dirname(__file__), jsFileName)) as f:
+ js = f.read()
+ tab.ExecuteJavaScript(js)
« no previous file with comments | « telemetry/telemetry/internal/actions/tap.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698