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

Unified Diff: tools/telemetry/telemetry/internal/actions/loop.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/loop.py
diff --git a/tools/telemetry/telemetry/internal/actions/loop.py b/tools/telemetry/telemetry/internal/actions/loop.py
deleted file mode 100644
index 240f6f9fd3df2178d11d62638eb3e36b3fcf11e5..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/actions/loop.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 2013 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.
-
-"""A Telemetry page_action that loops media playback.
-
-Action parameters are:
-- loop_count: The number of times to loop media.
-- selector: If no selector is defined then the action attempts to loop the first
- media element on the page. If 'all' then loop all media elements.
-- timeout_in_seconds: Timeout to wait for media to loop. Default is
- 60 sec x loop_count. 0 means do not wait.
-"""
-
-from telemetry.core import exceptions
-from telemetry.internal.actions import media_action
-from telemetry.internal.actions import page_action
-
-
-class LoopAction(media_action.MediaAction):
- def __init__(self, loop_count, selector=None, timeout_in_seconds=None):
- super(LoopAction, self).__init__()
- self._loop_count = loop_count
- self._selector = selector if selector else ''
- self._timeout_in_seconds = (
- timeout_in_seconds if timeout_in_seconds else 60 * loop_count)
-
- def WillRunAction(self, tab):
- """Load the media metrics JS code prior to running the action."""
- super(LoopAction, self).WillRunAction(tab)
- self.LoadJS(tab, 'loop.js')
-
- def RunAction(self, tab):
- try:
- tab.ExecuteJavaScript('window.__loopMedia("%s", %i);' %
- (self._selector, self._loop_count))
- if self._timeout_in_seconds > 0:
- self.WaitForEvent(tab, self._selector, 'loop', self._timeout_in_seconds)
- except exceptions.EvaluateException:
- raise page_action.PageActionFailed('Cannot loop media element(s) with '
- 'selector = %s.' % self._selector)
« no previous file with comments | « tools/telemetry/telemetry/internal/actions/loop.js ('k') | tools/telemetry/telemetry/internal/actions/loop_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698