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

Unified Diff: tools/telemetry/telemetry/page/actions/drag_unittest.py

Issue 1007953002: Fixing Telemetry drag_unittest.py fail on Mac OSX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added warning. Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/page/actions/drag_unittest.py
diff --git a/tools/telemetry/telemetry/page/actions/drag_unittest.py b/tools/telemetry/telemetry/page/actions/drag_unittest.py
index 0fabe60c13dd1e2d166a875813a94acf9ae86454..b397c14b19cbb36b95478fc28ff0548b7dfbd235 100644
--- a/tools/telemetry/telemetry/page/actions/drag_unittest.py
+++ b/tools/telemetry/telemetry/page/actions/drag_unittest.py
@@ -1,10 +1,12 @@
# 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.page.actions import drag
+from telemetry.page.actions import page_action
from telemetry.unittest_util import tab_test_case
@@ -28,7 +30,13 @@ class DragActionTest(tab_test_case.TabTestCase):
i = drag.DragAction(left_start_ratio=0.5, top_start_ratio=0.5,
left_end_ratio=0.25, top_end_ratio=0.25)
- i.WillRunAction(self._tab)
+ try:
+ i.WillRunAction(self._tab)
+ except page_action.PageActionNotSupported:
+ logging.warning('This browser does not support drag gesture. Please try'
+ ' updating chrome.')
+ return
+
self._tab.ExecuteJavaScript('''
window.__dragAction.beginMeasuringHook = function() {
window.__didBeginMeasuring = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698