Index: tools/perf/measurements/screenshot_unittest.py |
diff --git a/tools/perf/measurements/skpicture_printer_unittest.py b/tools/perf/measurements/screenshot_unittest.py |
similarity index 59% |
copy from tools/perf/measurements/skpicture_printer_unittest.py |
copy to tools/perf/measurements/screenshot_unittest.py |
index cc762b81999cdb966de115ca5babec380ce473c6..db0c04268a4f434ec5504aec50c9f7f40a2c7ea2 100644 |
--- a/tools/perf/measurements/skpicture_printer_unittest.py |
+++ b/tools/perf/measurements/screenshot_unittest.py |
@@ -2,33 +2,32 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import logging |
import shutil |
import tempfile |
-from measurements import skpicture_printer |
-from telemetry import test |
+from measurements import screenshot |
from telemetry.page import page_measurement_unittest_base |
+from telemetry.page import page_test |
from telemetry.unittest import options_for_unittests |
-class SkpicturePrinterUnitTest( |
+class ScreenshotUnitTest( |
page_measurement_unittest_base.PageMeasurementUnitTestBase): |
def setUp(self): |
self._options = options_for_unittests.GetCopy() |
- self._options.skp_outdir = tempfile.mkdtemp('_skp_test') |
+ self._options.png_outdir = tempfile.mkdtemp('_png_test') |
def tearDown(self): |
- shutil.rmtree(self._options.skp_outdir) |
+ shutil.rmtree(self._options.png_outdir) |
- @test.Disabled('android') |
- def testSkpicturePrinter(self): |
+ def testScreenshot(self): |
ps = self.CreatePageSetFromFileInUnittestDataDir('blank.html') |
- measurement = skpicture_printer.SkpicturePrinter() |
- results = self.RunMeasurement(measurement, ps, options=self._options) |
- |
- # Picture printing is not supported on all platforms. |
- if results.failures: |
- assert 'not supported' in results.failures[0][1] |
+ measurement = screenshot.Screenshot() |
+ try: |
+ results = self.RunMeasurement(measurement, ps, options=self._options) |
+ except page_test.TestNotSupportedOnPlatformFailure as failure: |
+ logging.warning(str(failure)) |
return |
saved_picture_count = results.FindAllPageSpecificValuesNamed( |