1 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 import json 6 7 from profile_chrome import chrome_startup_tracing_agent 8 from systrace import decorators 9 from systrace.tracing_agents import agents_unittest 10 11 12 class ChromeAgentTest(agents_unittest.BaseAgentTest): 13 # TODO(washingtonp): This test seems to fail on the version of Android 14 # currently on the Trybot servers (KTU84P), although it works on Android M. 15 # Either upgrade the version of Android on the Trybot servers or determine 16 # if there is a way to run this agent on Android KTU84P. 17 @decorators.Disabled 18 def testTracing(self): 19 agent = chrome_startup_tracing_agent.ChromeStartupTracingAgent( 20 self.device, self.package_info, False, 'https://www.google.com') 21 22 try: 23 agent.StartAgentTracing(None) 24 finally: 25 agent.StopAgentTracing() 26 27 result = agent.GetResults() 28 json.loads(result.raw_data) 29