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

Unified Diff: tools/telemetry/telemetry/core/browser_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/telemetry/telemetry/core/browser.py ('k') | tools/telemetry/telemetry/core/tab_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/core/browser_unittest.py
diff --git a/tools/telemetry/telemetry/core/browser_unittest.py b/tools/telemetry/telemetry/core/browser_unittest.py
index a75372d0af53040ea27cf0c1b38e650940aa36ba..eae2d42282ca4f5d2631f05f772d15b3dee79ab2 100644
--- a/tools/telemetry/telemetry/core/browser_unittest.py
+++ b/tools/telemetry/telemetry/core/browser_unittest.py
@@ -8,6 +8,8 @@ from telemetry import benchmark
from telemetry.core import gpu_device
from telemetry.core import gpu_info
from telemetry.core import system_info
+from telemetry.core.platform import tracing_category_filter
+from telemetry.core.platform import tracing_options
from telemetry.unittest import browser_test_case
@@ -103,13 +105,17 @@ class BrowserTest(browser_test_case.BrowserTestCase):
self.assertTrue(self._browser.memory_stats['SystemTotalPhysicalMemory'] > 0)
def testIsTracingRunning(self):
- if not self._browser.supports_tracing:
+ tracing_controller = self._browser.platform.tracing_controller
+ if not tracing_controller.IsChromeTracingSupported(self._browser):
return
- self.assertFalse(self._browser.is_tracing_running)
- self._browser.StartTracing()
- self.assertTrue(self._browser.is_tracing_running)
- self._browser.StopTracing()
- self.assertFalse(self._browser.is_tracing_running)
+ self.assertFalse(tracing_controller.is_tracing_running)
+ options = tracing_options.TracingOptions()
+ options.enable_chrome_trace = True
+ category_filter = tracing_category_filter.TracingCategoryFilter()
+ tracing_controller.Start(options, category_filter)
+ self.assertTrue(tracing_controller.is_tracing_running)
+ tracing_controller.Stop()
+ self.assertFalse(tracing_controller.is_tracing_running)
class CommandLineBrowserTest(browser_test_case.BrowserTestCase):
« no previous file with comments | « tools/telemetry/telemetry/core/browser.py ('k') | tools/telemetry/telemetry/core/tab_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698