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

Unified Diff: tools/telemetry/telemetry/core/platform/android_platform_backend_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
Index: tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py b/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
index 8217d00d23f0345e641d1b416fcebf645fc153bb..3a47b315e9dc220b42dffbbf1d139683d5625446 100644
--- a/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
+++ b/tools/telemetry/telemetry/core/platform/android_platform_backend_unittest.py
@@ -2,13 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging
-import os
import unittest
from telemetry import test
-from telemetry.core import bitmap
-from telemetry.core import util
from telemetry.core.platform import android_platform_backend
from telemetry.unittest import system_stub
@@ -70,34 +66,3 @@ class AndroidPlatformBackendTest(unittest.TestCase):
cpu_stats = backend.GetCpuStats('7702')
self.assertEquals(cpu_stats, {})
- @test.Disabled
- def testFramesFromMp4(self):
- mock_adb = MockDevice(MockAdbCommands([]))
- backend = android_platform_backend.AndroidPlatformBackend(mock_adb, False)
-
- try:
- backend.InstallApplication('avconv')
- finally:
- if not backend.CanLaunchApplication('avconv'):
- logging.warning('Test not supported on this platform')
- return # pylint: disable=W0150
-
- vid = os.path.join(util.GetUnittestDataDir(), 'vid.mp4')
- expected_timestamps = [
- 0,
- 763,
- 783,
- 940,
- 1715,
- 1732,
- 1842,
- 1926,
- ]
-
- # pylint: disable=W0212
- for i, timestamp_bitmap in enumerate(backend._FramesFromMp4(vid)):
- timestamp, bmp = timestamp_bitmap
- self.assertEquals(timestamp, expected_timestamps[i])
- expected_bitmap = bitmap.Bitmap.FromPngFile(os.path.join(
- util.GetUnittestDataDir(), 'frame%d.png' % i))
- self.assertTrue(expected_bitmap.IsEqual(bmp))
« no previous file with comments | « tools/telemetry/telemetry/core/platform/android_platform_backend.py ('k') | tools/telemetry/telemetry/core/tab.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698