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

Unified Diff: tools/telemetry/telemetry/core/platform_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
« no previous file with comments | « tools/telemetry/telemetry/core/platform.py ('k') | tools/telemetry/telemetry/core/profiling_controller.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/platform_unittest.py
diff --git a/tools/telemetry/telemetry/core/platform_unittest.py b/tools/telemetry/telemetry/core/platform_unittest.py
deleted file mode 100644
index 6454d842bcffbda4eacabc47f4b09a7d9454f729..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/core/platform_unittest.py
+++ /dev/null
@@ -1,46 +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.
-
-import os
-import tempfile
-
-from telemetry import decorators
-from telemetry.core import os_version
-from telemetry.util import image_util
-from telemetry.testing import tab_test_case
-
-
-class PlatformScreenshotTest(tab_test_case.TabTestCase):
-
- @decorators.Disabled('win') # crbug.com/570955
- def testScreenshotSupported(self):
- if self._platform.GetOSName() == 'android':
- self.assertTrue(self._platform.CanTakeScreenshot())
-
- # Run this test in serial to avoid multiple browsers pop up on the screen.
- @decorators.Isolated
- @decorators.Disabled('linux') # crbug.com/563656
- @decorators.Disabled('win') # crbug.com/570955
- def testScreenshot(self):
- if not self._platform.CanTakeScreenshot():
- self.skipTest('Platform does not support screenshots, skipping test.')
- # Skip the test on Mac 10.5, 10.6, 10.7 because png format isn't
- # recognizable on Mac < 10.8 (crbug.com/369490#c13)
- if (self._platform.GetOSName() == 'mac' and
- self._platform.GetOSVersionName() in
- (os_version.LEOPARD, os_version.SNOWLEOPARD, os_version.LION)):
- self.skipTest('OS X version %s too old' % self._platform.GetOSName())
- tf = tempfile.NamedTemporaryFile(delete=False, suffix='.png')
- tf.close()
- try:
- self.Navigate('screenshot_test.html')
- self._platform.TakeScreenshot(tf.name)
- # Assert that screenshot image contains the color of the triangle defined
- # in screenshot_test.html.
- img = image_util.FromPngFile(tf.name)
- screenshot_pixels = image_util.Pixels(img)
- special_colored_pixel = bytearray([217, 115, 43])
- self.assertTrue(special_colored_pixel in screenshot_pixels)
- finally:
- os.remove(tf.name)
« no previous file with comments | « tools/telemetry/telemetry/core/platform.py ('k') | tools/telemetry/telemetry/core/profiling_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698