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

Side by Side Diff: systrace/profile_chrome/chrome_tracing_agent_unittest.py

Issue 2295913002: Enable some profile_chrome unit tests on Trybots (Closed) Base URL: https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git@master
Patch Set: Add never-run decorator to perf agent as well Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 6
7 from profile_chrome import chrome_tracing_agent 7 from profile_chrome import chrome_tracing_agent
8 from profile_chrome import agents_unittest 8 from profile_chrome import agents_unittest
9 from systrace import decorators
9 10
10 11
11 class ChromeAgentTest(agents_unittest.BaseAgentTest): 12 class ChromeAgentTest(agents_unittest.BaseAgentTest):
13 @decorators.NeverRunTest
12 def testGetCategories(self): 14 def testGetCategories(self):
13 categories = \ 15 categories = \
14 chrome_tracing_agent.ChromeTracingAgent.GetCategories( 16 chrome_tracing_agent.ChromeTracingAgent.GetCategories(
15 self.device, self.package_info) 17 self.device, self.package_info)
16 18
17 self.assertEquals(len(categories), 2) 19 self.assertEquals(len(categories), 2)
18 self.assertTrue(categories[0]) 20 self.assertTrue(categories[0])
19 self.assertTrue(categories[1]) 21 self.assertTrue(categories[1])
20 22
23 @decorators.ClientOnlyTest
21 def testTracing(self): 24 def testTracing(self):
22 categories = '*' 25 categories = '*'
23 ring_buffer = False 26 ring_buffer = False
24 agent = chrome_tracing_agent.ChromeTracingAgent(self.device, 27 agent = chrome_tracing_agent.ChromeTracingAgent(self.device,
25 self.package_info, 28 self.package_info,
26 ring_buffer) 29 ring_buffer)
27 30
28 agent.StartAgentTracing(chrome_tracing_agent.ChromeConfig(categories, None, 31 agent.StartAgentTracing(chrome_tracing_agent.ChromeConfig(categories, None,
29 None, None, None, 32 None, None, None,
30 None, None, 33 None, None,
31 None)) 34 None))
32 agent.StopAgentTracing() 35 agent.StopAgentTracing()
33 result = agent.GetResults() 36 result = agent.GetResults()
34 json.loads(result.raw_data) 37 json.loads(result.raw_data)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698