[iOS] Load packed resources when running ios_chrome_unittests
[chromium-blink-merge.git] / tools / profile_chrome / ddms_controller_unittest.py
bloba9b5aaee068fd7e86f09d6bd2e9f0e82e527a1d1
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.
5 import os
7 from profile_chrome import controllers_unittest
8 from profile_chrome import ddms_controller
11 class DdmsControllerTest(controllers_unittest.BaseControllerTest):
12 def testTracing(self):
13 controller = ddms_controller.DdmsController(self.device, self.package_info)
15 interval = 1
16 try:
17 controller.StartTracing(interval)
18 finally:
19 controller.StopTracing()
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)