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

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

Issue 200843002: Convert smoothness to the new timeline based metric API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/perf/metrics/smoothness.py ('k') | tools/perf/metrics/timeline.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/metrics/smoothness_unittest.py
diff --git a/tools/perf/metrics/smoothness_unittest.py b/tools/perf/metrics/smoothness_unittest.py
deleted file mode 100644
index afcaed71750141a5db3d8f253b526fd0166ee134..0000000000000000000000000000000000000000
--- a/tools/perf/metrics/smoothness_unittest.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright 2014 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 unittest
-
-from metrics import smoothness
-
-from telemetry.page import page
-
-
-class FakePlatform(object):
- def IsRawDisplayFrameRateSupported(self):
- return False
-
-
-class FakeBrowser(object):
- def __init__(self):
- self.platform = FakePlatform()
- self.category_filter = None
-
- def StartTracing(self, category_filter, _):
- self.category_filter = category_filter
-
-
-class FakeTab(object):
- def __init__(self):
- self.browser = FakeBrowser()
-
- def ExecuteJavaScript(self, js):
- pass
-
-
-class SmoothnessMetricUnitTest(unittest.TestCase):
- def testSyntheticDelayConfiguration(self):
- attributes = {
- 'synthetic_delays': {
- 'cc.BeginMainFrame': { 'target_duration': 0.012 },
- 'cc.DrawAndSwap': { 'target_duration': 0.012, 'mode': 'alternating' },
- 'gpu.SwapBuffers': { 'target_duration': 0.012 }
- }
- }
- test_page = page.Page('http://dummy', None, attributes=attributes)
-
- tab = FakeTab()
- smoothness_metric = smoothness.SmoothnessMetric()
- smoothness_metric.Start(test_page, tab)
-
- expected_category_filter = [
- 'DELAY(cc.BeginMainFrame;0.012000;static)',
- 'DELAY(cc.DrawAndSwap;0.012000;alternating)',
- 'DELAY(gpu.SwapBuffers;0.012000;static)',
- 'benchmark',
- 'webkit.console'
- ]
- self.assertEquals(expected_category_filter,
- sorted(tab.browser.category_filter.split(',')))
« no previous file with comments | « tools/perf/metrics/smoothness.py ('k') | tools/perf/metrics/timeline.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698