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

Unified Diff: tools/telemetry/telemetry/internal/actions/repaint_continuously.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/repaint_continuously.py
diff --git a/tools/telemetry/telemetry/internal/actions/repaint_continuously.py b/tools/telemetry/telemetry/internal/actions/repaint_continuously.py
deleted file mode 100644
index a8c49579d916beb1eeb00ad101c71fa7218baab7..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/actions/repaint_continuously.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 2014 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 time
-
-from telemetry.core import util
-from telemetry.internal.actions import page_action
-
-
-class RepaintContinuouslyAction(page_action.PageAction):
- """Continuously repaints the visible content by requesting animation frames
- until self.seconds have elapsed AND at least three RAFs have been fired. Times
- out after max(60, self.seconds), if less than three RAFs were fired.
- """
-
- def __init__(self, seconds):
- super(RepaintContinuouslyAction, self).__init__()
- self._seconds = seconds
-
- def RunAction(self, tab):
- tab.ExecuteJavaScript(
- 'window.__rafCount = 0;'
- 'window.__rafFunction = function() {'
- 'window.__rafCount += 1;'
- 'window.webkitRequestAnimationFrame(window.__rafFunction);'
- '};'
- 'window.webkitRequestAnimationFrame(window.__rafFunction);')
-
- # Wait until at least self.seconds have elapsed AND min_rafs have been
- # fired. Use a hard time-out after 60 seconds (or self.seconds).
- time.sleep(self._seconds)
- def HasMinRafs():
- return tab.EvaluateJavaScript('window.__rafCount;') >= 3
- util.WaitFor(HasMinRafs, max(60 - self._seconds, 0))

Powered by Google App Engine
This is Rietveld 408576698