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

Unified Diff: tools/perf/metrics/speedindex_unittest.py

Issue 303043002: Refactor all video related processing to its own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing speedindex tests and resync Created 6 years, 6 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 | « tools/perf/metrics/speedindex.py ('k') | tools/telemetry/telemetry/core/platform/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/speedindex_unittest.py
diff --git a/tools/perf/metrics/speedindex_unittest.py b/tools/perf/metrics/speedindex_unittest.py
index c586bf9f735417f19966d36bc586097e5d83b89d..ee47ac01d87ec9a87a854953971f7ef151b7eac6 100644
--- a/tools/perf/metrics/speedindex_unittest.py
+++ b/tools/perf/metrics/speedindex_unittest.py
@@ -36,6 +36,15 @@ class FakeTimelineModel(object):
return self._events
+class FakeVideo(object):
+
+ def __init__(self, frames):
+ self._frames = frames
+
+ def GetVideoFrameIter(self):
+ for frame in self._frames:
+ yield frame
+
class FakeBitmap(object):
def __init__(self, r, g, b):
@@ -51,7 +60,7 @@ class FakeTab(object):
def __init__(self, video_capture_result=None):
self._timeline_model = FakeTimelineModel()
self._javascript_result = None
- self._video_capture_result = video_capture_result
+ self._video_capture_result = FakeVideo(video_capture_result)
@property
def timeline_model(self):
« no previous file with comments | « tools/perf/metrics/speedindex.py ('k') | tools/telemetry/telemetry/core/platform/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698