Home | History | Annotate | Download | only in profile_chrome
      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 os
      6 
      7 from profile_chrome import controllers_unittest
      8 from profile_chrome import ddms_controller
      9 
     10 
     11 class DdmsControllerTest(controllers_unittest.BaseControllerTest):
     12   def testTracing(self):
     13     controller = ddms_controller.DdmsController(self.device, self.package_info)
     14 
     15     interval = 1
     16     try:
     17       controller.StartTracing(interval)
     18     finally:
     19       controller.StopTracing()
     20 
     21     result = controller.PullTrace()
     22     try:
     23       with open(result) as f:
     24         self.assertTrue(f.read().startswith('*version'))
     25     finally:
     26       os.remove(result)
     27