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

Unified Diff: tools/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py
diff --git a/tools/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py b/tools/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py
deleted file mode 100644
index f5341e9897e1f072e7004c8b5bb832e80bb7a6a0..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/actions/repeatable_scroll_unittest.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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.
-
-from telemetry.internal.actions import repeatable_scroll
-from telemetry.internal.browser import browser_info as browser_info_module
-from telemetry.testing import tab_test_case
-
-
-class RepeatableScrollActionTest(tab_test_case.TabTestCase):
-
- def setUp(self):
- tab_test_case.TabTestCase.setUp(self)
- self.Navigate('blank.html')
-
- # Make page bigger than window so it's scrollable.
- self._tab.ExecuteJavaScript('document.body.style.height = '
- ' (3 * window.innerHeight + 1) + "px";')
-
- self.assertEquals(
- self._tab.EvaluateJavaScript('document.documentElement.scrollTop '
- '|| document.body.scrollTop'), 0)
-
- self._browser_info = browser_info_module.BrowserInfo(self._tab.browser)
- self._window_height = int(
- self._tab.EvaluateJavaScript('window.innerHeight'))
-
- def testRepeatableScrollActionNoRepeats(self):
- if not self._browser_info.HasRepeatableSynthesizeScrollGesture():
- return
-
- expected_scroll = (self._window_height / 2) - 1
-
- i = repeatable_scroll.RepeatableScrollAction(y_scroll_distance_ratio=0.5)
- i.WillRunAction(self._tab)
-
- i.RunAction(self._tab)
-
- scroll_position = self._tab.EvaluateJavaScript(
- '(document.documentElement.scrollTop || document.body.scrollTop)')
- # We can only expect the final scroll position to be approximatly equal.
- self.assertTrue(abs(scroll_position - expected_scroll) < 20,
- msg='scroll_position=%d;expected %d' % (scroll_position,
- expected_scroll))
-
- def testRepeatableScrollActionTwoRepeats(self):
- if not self._browser_info.HasRepeatableSynthesizeScrollGesture():
- return
-
- expected_scroll = ((self._window_height / 2) - 1) * 3
-
- i = repeatable_scroll.RepeatableScrollAction(y_scroll_distance_ratio=0.5,
- repeat_count=2,
- repeat_delay_ms=1)
- i.WillRunAction(self._tab)
-
- i.RunAction(self._tab)
-
- scroll_position = self._tab.EvaluateJavaScript(
- '(document.documentElement.scrollTop || document.body.scrollTop)')
- # We can only expect the final scroll position to be approximatly equal.
- self.assertTrue(abs(scroll_position - expected_scroll) < 20,
- msg='scroll_position=%d;expected %d' % (scroll_position,
- expected_scroll))
« no previous file with comments | « tools/telemetry/telemetry/internal/actions/repeatable_scroll.py ('k') | tools/telemetry/telemetry/internal/actions/scroll.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698