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

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

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge 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
Index: telemetry/telemetry/internal/actions/drag_unittest.py
diff --git a/telemetry/telemetry/internal/actions/drag_unittest.py b/telemetry/telemetry/internal/actions/drag_unittest.py
index 439ade62c920de5fd780212aa24542eaa0078d45..82bffc8ddd2ba4b389f4e740ac3ac0402ca0375d 100644
--- a/telemetry/telemetry/internal/actions/drag_unittest.py
+++ b/telemetry/telemetry/internal/actions/drag_unittest.py
@@ -1,13 +1,14 @@
# Copyright 2015 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
import math
-import os
from telemetry import decorators
from telemetry.internal.actions import drag
from telemetry.internal.actions import page_action
+from telemetry.internal.actions import utils
from telemetry.testing import tab_test_case
@@ -20,10 +21,7 @@ class DragActionTest(tab_test_case.TabTestCase):
def testDragAction(self):
self.Navigate('draggable.html')
- with open(os.path.join(os.path.dirname(__file__),
- 'gesture_common.js')) as f:
- js = f.read()
- self._tab.ExecuteJavaScript(js)
+ utils.InjectJavaScript(self._tab, 'gesture_common.js')
div_width = self._tab.EvaluateJavaScript(
'__GestureCommon_GetBoundingVisibleRect(document.body).width')
« no previous file with comments | « telemetry/telemetry/internal/actions/drag.py ('k') | telemetry/telemetry/internal/actions/gesture_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698