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

Unified Diff: tools/perf/measurements/screenshot_unittest.py

Issue 271733008: telemetry: add screenshot measurement (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/perf/measurements/screenshot_unittest.py
diff --git a/tools/perf/measurements/skpicture_printer_unittest.py b/tools/perf/measurements/screenshot_unittest.py
similarity index 63%
copy from tools/perf/measurements/skpicture_printer_unittest.py
copy to tools/perf/measurements/screenshot_unittest.py
index cc762b81999cdb966de115ca5babec380ce473c6..ed0a307c008da2073f2613cb18980e129020162a 100644
--- a/tools/perf/measurements/skpicture_printer_unittest.py
+++ b/tools/perf/measurements/screenshot_unittest.py
@@ -5,32 +5,25 @@
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.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()
+ measurement = screenshot.Screenshot()
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]
- return
-
saved_picture_count = results.FindAllPageSpecificValuesNamed(
'saved_picture_count')
self.assertEquals(len(saved_picture_count), 1)
« tools/perf/measurements/screenshot.py ('K') | « tools/perf/measurements/screenshot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698