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

Unified Diff: tools/telemetry/telemetry/unittest/page_test_test_case.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
Index: tools/telemetry/telemetry/unittest/page_test_test_case.py
diff --git a/tools/telemetry/telemetry/unittest/page_test_test_case.py b/tools/telemetry/telemetry/unittest/page_test_test_case.py
index 2fb3ee41a290a24e1395d9b36918ce787ec088c3..c89f31f48a6cba85b258d2104987ec4f43775e5f 100644
--- a/tools/telemetry/telemetry/unittest/page_test_test_case.py
+++ b/tools/telemetry/telemetry/unittest/page_test_test_case.py
@@ -85,20 +85,21 @@ class PageTestTestCase(unittest.TestCase):
def __init__(self, *args, **kwargs):
measurement_class.__init__(self, *args, **kwargs)
- # Inject fake tracing methods to browser
+ # Inject fake tracing methods to tracing_controller
def TabForPage(self, page, browser):
- ActualStartTracing = browser.StartTracing
+ ActualStartTracing = browser.platform.tracing_controller.Start
def FakeStartTracing(*args, **kwargs):
ActualStartTracing(*args, **kwargs)
start_tracing_called[0] = True
raise exceptions.IntentionalException
browser.StartTracing = FakeStartTracing
- ActualStopTracing = browser.StopTracing
+ ActualStopTracing = browser.platform.tracing_controller.Stop
def FakeStopTracing(*args, **kwargs):
- ActualStopTracing(*args, **kwargs)
+ result = ActualStopTracing(*args, **kwargs)
stop_tracing_called[0] = True
- browser.StopTracing = FakeStopTracing
+ return result
+ browser.platform.tracing_controller.Stop = FakeStopTracing
return measurement_class.TabForPage(self, page, browser)

Powered by Google App Engine
This is Rietveld 408576698