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

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

Issue 471763003: Remove deprecated methods related to tracing in browser.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/measurements/smoothness_controller.py ('k') | tools/perf/measurements/timeline_controller.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 d5fe018b76347500a8da449ab1c35e1e2cd635f0..e9fdd26f0e8cdcf0d6f7b029d6f84f173c22f1bd 100644
--- a/tools/perf/measurements/smoothness_unittest.py
+++ b/tools/perf/measurements/smoothness_unittest.py
@@ -13,7 +13,16 @@ from telemetry.unittest import options_for_unittests
from telemetry.unittest import page_test_test_case
from telemetry.unittest import test
+class FakeTracingController(object):
+ def __init__(self):
+ self.category_filter = None
+ def Start(self, _options, category_filter, _timeout):
+ self.category_filter = category_filter
+
+
class FakePlatform(object):
+ def __init__(self):
+ self.tracing_controller = FakeTracingController()
def IsRawDisplayFrameRateSupported(self):
return False
def CanMonitorPower(self):
@@ -23,10 +32,6 @@ class FakePlatform(object):
class FakeBrowser(object):
def __init__(self):
self.platform = FakePlatform()
- self.category_filter = None
-
- def StartTracing(self, category_filter, _):
- self.category_filter = category_filter
class AnimatedPage(page.Page):
@@ -67,14 +72,15 @@ class SmoothnessUnitTest(page_test_test_case.PageTestTestCase):
measurement.WillNavigateToPage(test_page, tab)
measurement.WillRunActions(test_page, tab)
- expected_category_filter = [
+ expected_category_filter = set([
'DELAY(cc.BeginMainFrame;0.012000;static)',
'DELAY(cc.DrawAndSwap;0.012000;alternating)',
'DELAY(gpu.PresentingFrame;0.012000;static)',
'benchmark'
- ]
- actual_category_filter = tab.browser.category_filter.split(',')
- actual_category_filter.sort()
+ ])
+ tracing_controller = tab.browser.platform.tracing_controller
+ actual_category_filter = (
+ tracing_controller.category_filter.included_categories)
# FIXME: Put blink.console into the expected above and remove these two
# remove entries when the blink.console change has rolled into chromium.
« no previous file with comments | « tools/perf/measurements/smoothness_controller.py ('k') | tools/perf/measurements/timeline_controller.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698