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

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

Issue 814813003: Added test that SurfaceFlinger metrics are calculated on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PLEASE IGNORE: accidentally uploaded to wrong issue Created 6 years 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/measurements/smoothness_controller.py ('k') | tools/perf/measurements/task_execution_time.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/measurements/smoothness_unittest.py
diff --git a/tools/perf/measurements/smoothness_unittest.py b/tools/perf/measurements/smoothness_unittest.py
index 1b86ad09b8ceba4026189a37118ba379705fd11f..fc8a87509b66a7c33718050805a4957d1328584b 100644
--- a/tools/perf/measurements/smoothness_unittest.py
+++ b/tools/perf/measurements/smoothness_unittest.py
@@ -128,6 +128,21 @@ class SmoothnessUnitTest(page_test_test_case.PageTestTestCase):
self.assertGreater(
mean_input_event_latency[0].GetRepresentativeNumber(), 0)
+ @decorators.Enabled('android') # SurfaceFlinger is android-only
+ def testSmoothnessSurfaceFlingerMetricsCalculated(self):
+ ps = self.CreatePageSetFromFileInUnittestDataDir('scrollable_page.html')
+ measurement = smoothness.Smoothness()
+ results = self.RunMeasurement(measurement, ps, options=self._options)
+ self.assertEquals(0, len(results.failures))
+
+ avg_surface_fps = results.FindAllPageSpecificValuesNamed('avg_surface_fps')
+ self.assertEquals(1, len(avg_surface_fps))
+ self.assertGreater(avg_surface_fps[0].GetRepresentativeNumber, 0)
+
+ jank_count = results.FindAllPageSpecificValuesNamed('jank_count')
+ self.assertEquals(1, len(jank_count))
+ self.assertGreater(jank_count[0].GetRepresentativeNumber(), -1)
+
@decorators.Disabled('mac', 'chromeos') # http://crbug.com/403903
def testSmoothnessForPageWithNoGesture(self):
ps = self.CreateEmptyPageSet()
« no previous file with comments | « tools/perf/measurements/smoothness_controller.py ('k') | tools/perf/measurements/task_execution_time.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698